[clang] [llvm] Remove -bounds-checking-unique-traps (replace with -fno-sanitize-merge=local-bounds) (PR #120682)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 21:14:36 PST 2024
================
@@ -1281,31 +1281,43 @@ parseRegAllocFastPassOptions(PassBuilder &PB, StringRef Params) {
return Opts;
}
-Expected<BoundsCheckingPass::ReportingMode>
+Expected<BoundsCheckingPass::BoundsCheckingOptions>
parseBoundsCheckingOptions(StringRef Params) {
- BoundsCheckingPass::ReportingMode Mode =
- BoundsCheckingPass::ReportingMode::Trap;
+ BoundsCheckingPass::BoundsCheckingOptions Options(
+ BoundsCheckingPass::ReportingMode::Trap, true);
while (!Params.empty()) {
StringRef ParamName;
std::tie(ParamName, Params) = Params.split(';');
if (ParamName == "trap") {
- Mode = BoundsCheckingPass::ReportingMode::Trap;
+ Options.Mode = BoundsCheckingPass::ReportingMode::Trap;
} else if (ParamName == "rt") {
- Mode = BoundsCheckingPass::ReportingMode::FullRuntime;
+ Options.Mode = BoundsCheckingPass::ReportingMode::FullRuntime;
} else if (ParamName == "rt-abort") {
- Mode = BoundsCheckingPass::ReportingMode::FullRuntimeAbort;
+ Options.Mode = BoundsCheckingPass::ReportingMode::FullRuntimeAbort;
} else if (ParamName == "min-rt") {
- Mode = BoundsCheckingPass::ReportingMode::MinRuntime;
+ Options.Mode = BoundsCheckingPass::ReportingMode::MinRuntime;
} else if (ParamName == "min-rt-abort") {
- Mode = BoundsCheckingPass::ReportingMode::MinRuntimeAbort;
+ Options.Mode = BoundsCheckingPass::ReportingMode::MinRuntimeAbort;
+ } else if (ParamName.consume_front("merge=")) {
+ if (ParamName == "true")
----------------
vitalybuka wrote:
we don't do true/false here
usually if it's missing -> false, if it's present -> true
Check `ParamName == "kernel"` in this file
https://github.com/llvm/llvm-project/pull/120682
More information about the llvm-commits
mailing list