[clang] [llvm] [LLVM][rtsan] Add module pass to initialize rtsan (PR #118989)

Chris Apple via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 07:12:31 PST 2024


================
@@ -1024,12 +1024,14 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
             FPM.addPass(BoundsCheckingPass());
           });
 
-    if (LangOpts.Sanitize.has(SanitizerKind::Realtime))
+    if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) {
       PB.registerScalarOptimizerLateEPCallback(
           [](FunctionPassManager &FPM, OptimizationLevel Level) {
             RealtimeSanitizerOptions Opts;
             FPM.addPass(RealtimeSanitizerPass(Opts));
           });
+      MPM.addPass(ModuleRealtimeSanitizerPass());
----------------
cjappl wrote:

Sounds good, I'll work on swapping rtsan over.

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


More information about the llvm-commits mailing list