150
|
1 ; A module with no asan-instrumented globals has no asan destructor, and has an asan constructor in a comdat.
|
207
|
2 ; RUN: opt -mtriple=x86_64-unknown-linux-gnu < %s -asan -asan-module -enable-new-pm=0 -asan-with-comdat=1 -asan-globals-live-support=1 -S | FileCheck %s
|
|
3 ; RUN: opt -mtriple=x86_64-unknown-linux-gnu < %s -passes='asan-pipeline' -asan-with-comdat=1 -asan-globals-live-support=1 -S | FileCheck %s
|
150
|
4
|
|
5 define void @f() {
|
|
6 ret void
|
|
7 }
|
|
8
|
|
9 ; CHECK-NOT: @llvm.global_dtors
|
|
10 ; CHECK: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 1, void ()* @asan.module_ctor, i8* bitcast (void ()* @asan.module_ctor to i8*) }]
|
|
11 ; CHECK-NOT: @llvm.global_dtors
|
207
|
12 ; CHECK: define internal void @asan.module_ctor() #[[#]] comdat
|
150
|
13 ; CHECK-NOT: @llvm.global_dtors
|