diff --git a/llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp index c3ea1471796bdfd..f27cf83cd3cf3d5 100644 --- a/llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp @@ -52,7 +52,7 @@ static PreservedAnalyses rtsanPreservedCFGAnalyses() { return PA; } -static void insertExpectNotRealtimeAtFunctionEntryPoint(Function &F) { +static void insertNotifyBlockingCallAtFunctionEntryPoint(Function &F) { IRBuilder<> Builder(&F.front().front()); Value *NameArg = Builder.CreateGlobalString(demangle(F.getName())); @@ -61,7 +61,7 @@ static void insertExpectNotRealtimeAtFunctionEntryPoint(Function &F) { {PointerType::getUnqual(F.getContext())}, false); FunctionCallee Func = F.getParent()->getOrInsertFunction( - "__rtsan_expect_not_realtime", FuncType); + "__rtsan_notify_blocking_call", FuncType); Builder.CreateCall(Func, {NameArg}); } @@ -78,7 +78,7 @@ PreservedAnalyses RealtimeSanitizerPass::run(Function &F, } if (F.hasFnAttribute(Attribute::SanitizeRealtimeUnsafe)) { - insertExpectNotRealtimeAtFunctionEntryPoint(F); + insertNotifyBlockingCallAtFunctionEntryPoint(F); return rtsanPreservedCFGAnalyses(); } diff --git a/llvm/test/Instrumentation/RealtimeSanitizer/rtsan_unsafe.ll b/llvm/test/Instrumentation/RealtimeSanitizer/rtsan_unsafe.ll index 0df01b95a79aea4..fe9f13778e35af8 100644 --- a/llvm/test/Instrumentation/RealtimeSanitizer/rtsan_unsafe.ll +++ b/llvm/test/Instrumentation/RealtimeSanitizer/rtsan_unsafe.ll @@ -16,4 +16,4 @@ attributes #0 = { mustprogress noinline sanitize_realtime_unsafe optnone ssp uwt ; CHECK: [[GLOBAL_STR:@[a-zA-Z0-9\.]+]] ; CHECK-SAME: c"blocking_function()\00" ; CHECK-LABEL: @_Z17blocking_functionv() -; CHECK-NEXT: call{{.*}}@__rtsan_expect_not_realtime(ptr{{.*}}[[GLOBAL_STR]]) +; CHECK-NEXT: call{{.*}}@__rtsan_notify_blocking_call(ptr{{.*}}[[GLOBAL_STR]])