Author: Chris Apple Date: 2024-12-13T13:00:09-08:00 New Revision: 0f776f1df9ec6345f298cc19c33dfea7f98289ec
URL: https://github.com/llvm/llvm-project/commit/0f776f1df9ec6345f298cc19c33dfea7f98289ec DIFF: https://github.com/llvm/llvm-project/commit/0f776f1df9ec6345f298cc19c33dfea7f98289ec.diff LOG: [rtsan][clang] NFC: Move rtsan init to addSanitizers (#119904) Added: Modified: clang/lib/CodeGen/BackendUtil.cpp Removed: ################################################################################ diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index b3728c478772d3..2ef098172c01f5 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -738,6 +738,9 @@ static void addSanitizers(const Triple &TargetTriple, if (LangOpts.Sanitize.has(SanitizerKind::NumericalStability)) MPM.addPass(NumericalStabilitySanitizerPass()); + if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) + MPM.addPass(RealtimeSanitizerPass()); + auto ASanPass = [&](SanitizerMask Mask, bool CompileKernel) { if (LangOpts.Sanitize.has(Mask)) { bool UseGlobalGC = asanUseGlobalsGC(TargetTriple, CodeGenOpts); @@ -1023,9 +1026,6 @@ void EmitAssemblyHelper::RunOptimizationPipeline( FPM.addPass(BoundsCheckingPass()); }); - if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) - MPM.addPass(RealtimeSanitizerPass()); - // Don't add sanitizers if we are here from ThinLTO PostLink. That already // done on PreLink stage. if (!IsThinLTOPostLink) { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits