aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorChris Apple <cja-private@pm.me>2024-12-13 08:50:36 -0800
committerGitHub <noreply@github.com>2024-12-13 08:50:36 -0800
commit4a6586140211cc9aed02d9177dba0c01622139f4 (patch)
treeb909e23d491e30e563858f5a8248eaf43f4ab8c5 /clang/lib/CodeGen/BackendUtil.cpp
parentce25bd20dc56cef651170f1ee5820758dee415a2 (diff)
downloadllvm-4a6586140211cc9aed02d9177dba0c01622139f4.zip
llvm-4a6586140211cc9aed02d9177dba0c01622139f4.tar.gz
llvm-4a6586140211cc9aed02d9177dba0c01622139f4.tar.bz2
[rtsan][llvm] Remove function pass, only support module pass (#119739)
Most of the other sanitizers are now only module level passes. This moves all functionality into the module pass, and removes the function pass.
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 8cf4459..b3728c4 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -1023,14 +1023,8 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
FPM.addPass(BoundsCheckingPass());
});
- if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) {
- PB.registerScalarOptimizerLateEPCallback(
- [](FunctionPassManager &FPM, OptimizationLevel Level) {
- RealtimeSanitizerOptions Opts;
- FPM.addPass(RealtimeSanitizerPass(Opts));
- });
- MPM.addPass(ModuleRealtimeSanitizerPass());
- }
+ 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.