1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 5
2 ; RUN: opt < %s -passes=rtsan -S | FileCheck %s
4 ; RealtimeSanitizer pass should create the demangled function name as a global string and,
5 ; at the function entrypoint, pass it as an argument to the rtsan notify method
8 ; CHECK: @[[GLOB0:[0-9]+]] = private unnamed_addr constant [20 x i8] c"blocking_function()\00", align 1
10 define void @_Z17blocking_functionv() #0 {
11 ; CHECK-LABEL: define void @_Z17blocking_functionv(
12 ; CHECK-SAME: ) #[[ATTR0:[0-9]+]] {
13 ; CHECK-NEXT: call void @__rtsan_notify_blocking_call(ptr @[[GLOB0]])
14 ; CHECK-NEXT: ret void
19 define noundef i32 @main() #2 {
20 ; CHECK-LABEL: define noundef i32 @main() {
21 ; CHECK-NEXT: call void @_Z17blocking_functionv()
22 ; CHECK-NEXT: ret i32 0
24 call void @_Z17blocking_functionv() #4
28 attributes #0 = { mustprogress noinline sanitize_realtime_blocking optnone ssp uwtable(sync) }
30 ; CHECK: attributes #[[ATTR0]] = { mustprogress noinline optnone sanitize_realtime_blocking ssp uwtable(sync) }