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() #[[#]] {