[clang] [clang][rtsan] Introduce realtime sanitizer codegen and driver (PR #102622)

Chris Apple via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 9 12:03:49 PDT 2024


================
@@ -845,6 +845,12 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy,
   if (SanOpts.has(SanitizerKind::ShadowCallStack))
     Fn->addFnAttr(llvm::Attribute::ShadowCallStack);
 
+  if (SanOpts.has(SanitizerKind::Realtime)) {
+    for (const FunctionEffectWithCondition &Fe : FD->getFunctionEffects())
+      if (Fe.Effect.kind() == FunctionEffect::Kind::NonBlocking)
+        Fn->addFnAttr(llvm::Attribute::SanitizeRealtime);
+  }
----------------
cjappl wrote:

Excellent, added that check in there.

https://github.com/llvm/llvm-project/pull/102622


More information about the cfe-commits mailing list