diff options
author | Chris Apple <cja-private@pm.me> | 2024-12-13 13:00:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-13 13:00:09 -0800 |
commit | 0f776f1df9ec6345f298cc19c33dfea7f98289ec (patch) | |
tree | 2c945ef866fc587b22ab8d465e0f684ef4d4a83f /clang/lib/CodeGen/BackendUtil.cpp | |
parent | e5ab6e960745bfda9204e696a0a99746075f3021 (diff) | |
download | llvm-0f776f1df9ec6345f298cc19c33dfea7f98289ec.zip llvm-0f776f1df9ec6345f298cc19c33dfea7f98289ec.tar.gz llvm-0f776f1df9ec6345f298cc19c33dfea7f98289ec.tar.bz2 |
[rtsan][clang] NFC: Move rtsan init to addSanitizers (#119904)
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index b3728c4..2ef0981 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) { |