Skip to content

Commit 1026627

Browse files
committed
[NFC][hwasan] Add a few of {}
1 parent a0879f2 commit 1026627

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -803,10 +803,11 @@ Value *HWAddressSanitizer::getDynamicShadowIfunc(IRBuilder<> &IRB) {
803803
}
804804

805805
Value *HWAddressSanitizer::getShadowNonTls(IRBuilder<> &IRB) {
806-
if (Mapping.Offset != kDynamicShadowSentinel)
806+
if (Mapping.Offset != kDynamicShadowSentinel) {
807807
return getOpaqueNoopCast(
808808
IRB, ConstantExpr::getIntToPtr(
809809
ConstantInt::get(IntptrTy, Mapping.Offset), PtrTy));
810+
}
810811

811812
if (Mapping.InGlobal)
812813
return getDynamicShadowIfunc(IRB);
@@ -1013,20 +1014,21 @@ void HWAddressSanitizer::instrumentMemAccessOutline(Value *Ptr, bool IsWrite,
10131014
static_cast<uint64_t>(OffsetShifted) << 32 == Mapping.Offset;
10141015
}
10151016

1016-
if (UseFixedShadowIntrinsic)
1017+
if (UseFixedShadowIntrinsic) {
10171018
IRB.CreateCall(
10181019
Intrinsic::getDeclaration(
10191020
M, UseShortGranules
10201021
? Intrinsic::hwasan_check_memaccess_shortgranules_fixedshadow
10211022
: Intrinsic::hwasan_check_memaccess_fixedshadow),
10221023
{Ptr, ConstantInt::get(Int32Ty, AccessInfo),
10231024
ConstantInt::get(Int64Ty, Mapping.Offset)});
1024-
else
1025+
} else {
10251026
IRB.CreateCall(Intrinsic::getDeclaration(
10261027
M, UseShortGranules
10271028
? Intrinsic::hwasan_check_memaccess_shortgranules
10281029
: Intrinsic::hwasan_check_memaccess),
10291030
{ShadowBase, Ptr, ConstantInt::get(Int32Ty, AccessInfo)});
1031+
}
10301032
}
10311033

10321034
void HWAddressSanitizer::instrumentMemAccessInline(Value *Ptr, bool IsWrite,

0 commit comments

Comments
 (0)