Skip to content

Commit be71437

Browse files
authored
Merge branch 'main' into support-x86-builtin-rotate
2 parents 718bcba + 5d4c441 commit be71437

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ PreservedAnalyses RealtimeSanitizerPass::run(Module &M,
9090
[&](Function *Ctor, FunctionCallee) { appendToGlobalCtors(M, Ctor, 0); });
9191

9292
for (Function &F : M) {
93+
if (F.empty())
94+
continue;
95+
9396
if (F.hasFnAttribute(Attribute::SanitizeRealtime))
9497
runSanitizeRealtime(F);
9598

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
; RUN: opt < %s -passes='rtsan' -S | FileCheck %s
2+
3+
declare void @declared_realtime_function() sanitize_realtime #0
4+
5+
declare void @declared_blocking_function() sanitize_realtime_blocking #0
6+
7+
; RealtimeSanitizer pass should ignore attributed functions that are just declarations
8+
; CHECK: declared_realtime_function
9+
; CHECK-EMPTY:
10+
; CHECK: declared_blocking_function
11+
; CHECK-EMPTY:

0 commit comments

Comments
 (0)