1 | ; Test that ASan runs with the new pass manager |
2 | ; RUN: %clang_cc1 -S -emit-llvm -o - -fexperimental-new-pass-manager -fsanitize=address %s | FileCheck %s --check-prefixes=CHECK,LTO,THINLTO |
3 | ; RUN: %clang_cc1 -S -emit-llvm -o - -fexperimental-new-pass-manager -fsanitize=address -flto %s | FileCheck %s --check-prefixes=CHECK,LTO |
4 | ; RUN: %clang_cc1 -S -emit-llvm -o - -fexperimental-new-pass-manager -fsanitize=address -flto=thin %s | FileCheck %s --check-prefixes=CHECK,THINLTO |
5 | ; RUN: %clang_cc1 -S -emit-llvm -o - -O1 -fexperimental-new-pass-manager -fsanitize=address %s | FileCheck %s --check-prefixes=CHECK,LTO,THINLTO |
6 | ; RUN: %clang_cc1 -S -emit-llvm -o - -O1 -fexperimental-new-pass-manager -fsanitize=address -flto %s | FileCheck %s --check-prefixes=CHECK,LTO |
7 | ; RUN: %clang_cc1 -S -emit-llvm -o - -O1 -fexperimental-new-pass-manager -fsanitize=address -flto=thin %s | FileCheck %s --check-prefixes=CHECK,THINLTO |
8 | |
9 | target triple = "x86_64-unknown-unknown" |
10 | |
11 | ; DAG-CHECK: @llvm.global_ctors = {{.*}}@asan.module_ctor |
12 | |
13 | define i32 @test_load(i32* %a) sanitize_address { |
14 | entry: |
15 | %tmp1 = load i32, i32* %a, align 4 |
16 | ret i32 %tmp1 |
17 | } |
18 | |
19 | ; CHECK: __asan_init |
20 | |
21 | ; DAG-CHECK: define internal void @asan.module_ctor() { |
22 | ; CHECK: {{.*}} call void @__asan_init() |
23 | ; CHECK: {{.*}} call void @__asan_version_mismatch_check_v8() |
24 | ; CHECK: ret void |
25 | ; CHECK: } |
26 | |
27 | ; DAG-CHECK: __asan_version_mismatch_check_v8 |
28 | |
29 | ; This is not used in ThinLTO |
30 | ; DAG-LTO: __asan_report_load4 |
31 | |