[llvm] 1026627 - [NFC][hwasan] Add a few of {}
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 22 18:13:18 PDT 2024
Author: Vitaly Buka
Date: 2024-09-22T18:12:59-07:00
New Revision: 10266279c3569b2e37ada2fbf6b927c45aa7ee41
URL: https://github.com/llvm/llvm-project/commit/10266279c3569b2e37ada2fbf6b927c45aa7ee41
DIFF: https://github.com/llvm/llvm-project/commit/10266279c3569b2e37ada2fbf6b927c45aa7ee41.diff
LOG: [NFC][hwasan] Add a few of {}
Added:
Modified:
llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
index 0bfdb8697ffda9..83dd3e5e8f2c56 100644
--- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
@@ -803,10 +803,11 @@ Value *HWAddressSanitizer::getDynamicShadowIfunc(IRBuilder<> &IRB) {
}
Value *HWAddressSanitizer::getShadowNonTls(IRBuilder<> &IRB) {
- if (Mapping.Offset != kDynamicShadowSentinel)
+ if (Mapping.Offset != kDynamicShadowSentinel) {
return getOpaqueNoopCast(
IRB, ConstantExpr::getIntToPtr(
ConstantInt::get(IntptrTy, Mapping.Offset), PtrTy));
+ }
if (Mapping.InGlobal)
return getDynamicShadowIfunc(IRB);
@@ -1013,7 +1014,7 @@ void HWAddressSanitizer::instrumentMemAccessOutline(Value *Ptr, bool IsWrite,
static_cast<uint64_t>(OffsetShifted) << 32 == Mapping.Offset;
}
- if (UseFixedShadowIntrinsic)
+ if (UseFixedShadowIntrinsic) {
IRB.CreateCall(
Intrinsic::getDeclaration(
M, UseShortGranules
@@ -1021,12 +1022,13 @@ void HWAddressSanitizer::instrumentMemAccessOutline(Value *Ptr, bool IsWrite,
: Intrinsic::hwasan_check_memaccess_fixedshadow),
{Ptr, ConstantInt::get(Int32Ty, AccessInfo),
ConstantInt::get(Int64Ty, Mapping.Offset)});
- else
+ } else {
IRB.CreateCall(Intrinsic::getDeclaration(
M, UseShortGranules
? Intrinsic::hwasan_check_memaccess_shortgranules
: Intrinsic::hwasan_check_memaccess),
{ShadowBase, Ptr, ConstantInt::get(Int32Ty, AccessInfo)});
+ }
}
void HWAddressSanitizer::instrumentMemAccessInline(Value *Ptr, bool IsWrite,
More information about the llvm-commits
mailing list