Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / asan-no-globals-no-comdat.cpp
blob9c7a0d2ff53dad96f81fa6827dbf2d2785606029
1 // Test that on Linux asan constructor is placed in a comdat iff globals-gc is on.
2 // Even if there are no globals in the module.
4 // RUN: %clang_cc1 -fsanitize=address -fsanitize-address-globals-dead-stripping -emit-llvm -o - -triple x86_64-linux %s | FileCheck %s --check-prefix=WITH-GC
5 // RUN: %clang_cc1 -fsanitize=address -fsanitize-address-globals-dead-stripping -fno-integrated-as -emit-llvm -o - -triple x86_64-linux %s | FileCheck %s --check-prefix=WITHOUT-GC
6 // RUN: %clang_cc1 -fsanitize=address -fdata-sections -emit-llvm -o - -triple x86_64-linux %s | FileCheck %s --check-prefix=WITHOUT-GC
8 // WITH-GC: define internal void @asan.module_ctor() #[[#]] comdat {
9 // WITHOUT-GC: define internal void @asan.module_ctor() #[[#]] {