Skip to content

Commit cdf2970

Browse files
committed
[NFC] [HWASan] fix LLVM style guide violations
1 parent abc2412 commit cdf2970

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ void HWAddressSanitizer::instrumentMemAccessOutline(Value *Ptr, bool IsWrite,
990990

991991
IRBuilder<> IRB(InsertBefore);
992992
Module *M = IRB.GetInsertBlock()->getParent()->getParent();
993-
bool useFixedShadowIntrinsic = false;
993+
bool UseFixedShadowIntrinsic = false;
994994
// The memaccess fixed shadow intrinsic is only supported on AArch64,
995995
// which allows a 16-bit immediate to be left-shifted by 32.
996996
// Since kShadowBaseAlignment == 32, and Linux by default will not
@@ -999,11 +999,12 @@ void HWAddressSanitizer::instrumentMemAccessOutline(Value *Ptr, bool IsWrite,
999999
// In particular, an offset of 4TB (1024 << 32) is representable, and
10001000
// ought to be good enough for anybody.
10011001
if (TargetTriple.isAArch64() && Mapping.Offset != kDynamicShadowSentinel) {
1002-
uint16_t offset_shifted = Mapping.Offset >> 32;
1003-
useFixedShadowIntrinsic = (uint64_t)offset_shifted << 32 == Mapping.Offset;
1002+
uint16_t OffsetShifted = Mapping.Offset >> 32;
1003+
UseFixedShadowIntrinsic =
1004+
static_cast<uint64_t>(OffsetShifted) << 32 == Mapping.Offset;
10041005
}
10051006

1006-
if (useFixedShadowIntrinsic)
1007+
if (UseFixedShadowIntrinsic)
10071008
IRB.CreateCall(
10081009
Intrinsic::getDeclaration(
10091010
M, UseShortGranules

0 commit comments

Comments
 (0)