aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authordavidtrevelyan <davidtrevelyan@users.noreply.github.com>2024-10-04 17:33:53 +0100
committerGitHub <noreply@github.com>2024-10-04 09:33:53 -0700
commit296a00bead8a25d875975ce68a5cd12c5fce6233 (patch)
treef08766083459ee3c63378aa373b7d1aec67fbb9e /clang/lib/CodeGen/CodeGenFunction.cpp
parented0f4074eb86f1588efb11bd06ad4fb383a9a921 (diff)
downloadllvm-296a00bead8a25d875975ce68a5cd12c5fce6233.zip
llvm-296a00bead8a25d875975ce68a5cd12c5fce6233.tar.gz
llvm-296a00bead8a25d875975ce68a5cd12c5fce6233.tar.bz2
[clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (#111055)
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 24723e3..e1fd9b7 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -850,6 +850,8 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy,
for (const FunctionEffectWithCondition &Fe : FD->getFunctionEffects()) {
if (Fe.Effect.kind() == FunctionEffect::Kind::NonBlocking)
Fn->addFnAttr(llvm::Attribute::SanitizeRealtime);
+ else if (Fe.Effect.kind() == FunctionEffect::Kind::Blocking)
+ Fn->addFnAttr(llvm::Attribute::SanitizeRealtimeUnsafe);
}
// Apply fuzzing attribute to the function.