[clang] [llvm] [NFC][BoundsChecking] Address #122576 review comments (PR #122773)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 13 11:31:09 PST 2025
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/122773
None
>From b6abdc748225c29544d3c82bfafb5fac3dfd67a7 Mon Sep 17 00:00:00 2001
From: Vitaly Buka <vitalybuka at google.com>
Date: Mon, 13 Jan 2025 11:30:49 -0800
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
=?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.4
---
clang/lib/CodeGen/BackendUtil.cpp | 3 ++-
llvm/lib/Passes/PassBuilder.cpp | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 79e6bf3d24dffb..3951ad01497cca 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -1032,7 +1032,8 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
static_assert(SanitizerKind::SO_LocalBounds <=
std::numeric_limits<
decltype(Options.GuardKind)::value_type>::max(),
- "Update type of llvm.allow.ubsan.check.");
+ "Update type of llvm.allow.ubsan.check to represent "
+ "SanitizerKind::SO_LocalBounds.");
Options.GuardKind = SanitizerKind::SO_LocalBounds;
}
Options.Merge =
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp
index f923d5aabe0a0e..a0bfcef6ce01a8 100644
--- a/llvm/lib/Passes/PassBuilder.cpp
+++ b/llvm/lib/Passes/PassBuilder.cpp
@@ -1318,7 +1318,7 @@ parseBoundsCheckingOptions(StringRef Params) {
StringRef ParamEQ;
StringRef Val;
std::tie(ParamEQ, Val) = ParamName.split('=');
- int8_t Id = 0;
+ int8_t Id;
if (ParamEQ == "guard" && !Val.getAsInteger(0, Id)) {
Options.GuardKind = Id;
} else {
More information about the llvm-commits
mailing list