llvm.org GIT mirror llvm / 4b731e4
[asan] Fix testcase for r264645 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264652 91177308-0d34-0410-b5e6-96231b3b80d8 Ryan Govostes 4 years ago
1 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
1414 !1 = !{!"test-globals.c", i32 1, i32 5}
1515
1616
17 ; Test that there is a Needle global variable:
18 ; CHECK: @__asan_needle = internal global i64 0
17 ; Test that there is the flag global variable:
18 ; CHECK: @__asan_globals_registered = common global i64 0
1919
2020 ; Find the metadata for @global:
2121 ; CHECK: [[METADATA:@[0-9]+]] = internal global {{.*}} @global {{.*}} section "__DATA,__asan_globals,regular", align 1
2323 ; Find the liveness binder for @global and its metadata:
2424 ; CHECK: @{{[0-9]+}} = internal global {{.*}} @global {{.*}} [[METADATA]] {{.*}} section "__DATA,__asan_liveness,regular,live_support"
2525
26 ; Test that __asan_apply_to_globals is invoked from the constructor:
26 ; Test that __asan_register_image_globals is invoked from the constructor:
2727 ; CHECK-LABEL: define internal void @asan.module_ctor
2828 ; CHECK-NOT: ret
29 ; CHECK: call void @__asan_apply_to_globals(i64 ptrtoint (void (i64, i64)* @__asan_register_globals to i64), i64 ptrtoint (i64* @__asan_needle to i64))
29 ; CHECK: call void @__asan_register_image_globals(i64 ptrtoint (i64* @__asan_globals_registered to i64))
3030 ; CHECK: ret
3131
32 ; Test that __asan_apply_to_globals is invoked from the destructor:
32 ; Test that __asan_unregister_image_globals is invoked from the destructor:
3333 ; CHECK-LABEL: define internal void @asan.module_dtor
3434 ; CHECK-NOT: ret
35 ; CHECK: call void @__asan_apply_to_globals(i64 ptrtoint (void (i64, i64)* @__asan_unregister_globals to i64), i64 ptrtoint (i64* @__asan_needle to i64))
35 ; CHECK: call void @__asan_unregister_image_globals(i64 ptrtoint (i64* @__asan_globals_registered to i64))
3636 ; CHECK: ret