[clang] [rtsan][clang] NFC: Move rtsan init to addSanitizers (PR #119904)
https://github.com/cjappl closed https://github.com/llvm/llvm-project/pull/119904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [rtsan][clang] NFC: Move rtsan init to addSanitizers (PR #119904)
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/119904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [rtsan][clang] NFC: Move rtsan init to addSanitizers (PR #119904)
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris Apple (cjappl) Changes This seems to pass tests and behaves as expected. As suggested by @vitalybuka on #118989 --- Full diff: https://github.com/llvm/llvm-project/pull/119904.diff 1 Files Affected: - (modified) clang/lib/CodeGen/BackendUtil.cpp (+3-3) ``diff 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) { `` https://github.com/llvm/llvm-project/pull/119904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [rtsan][clang] NFC: Move rtsan init to addSanitizers (PR #119904)
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Chris Apple (cjappl) Changes This seems to pass tests and behaves as expected. As suggested by @vitalybuka on #118989 --- Full diff: https://github.com/llvm/llvm-project/pull/119904.diff 1 Files Affected: - (modified) clang/lib/CodeGen/BackendUtil.cpp (+3-3) ``diff 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) { `` https://github.com/llvm/llvm-project/pull/119904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [rtsan][clang] NFC: Move rtsan init to addSanitizers (PR #119904)
https://github.com/cjappl created https://github.com/llvm/llvm-project/pull/119904 This seems to pass tests and behaves as expected. As suggested by @vitalybuka on #118989 >From 8cfcf0461739e45716be1b3ed6700b5712b7801e Mon Sep 17 00:00:00 2001 From: Chris Apple Date: Thu, 12 Dec 2024 10:37:14 -0800 Subject: [PATCH] [rtsan][clang] NFC: Move rtsan init to addSanitizers --- clang/lib/CodeGen/BackendUtil.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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