[llvm] cdf2970 - [NFC] [HWASan] fix LLVM style guide violations
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 20 16:47:57 PDT 2024
Author: Florian Mayer
Date: 2024-09-20T16:29:45-07:00
New Revision: cdf29709d7554c197b371c83e798bc6335f67a33
URL: https://github.com/llvm/llvm-project/commit/cdf29709d7554c197b371c83e798bc6335f67a33
DIFF: https://github.com/llvm/llvm-project/commit/cdf29709d7554c197b371c83e798bc6335f67a33.diff
LOG: [NFC] [HWASan] fix LLVM style guide violations
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 7a5c690c7ea512..11bd98200362f2 100644
--- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
@@ -990,7 +990,7 @@ void HWAddressSanitizer::instrumentMemAccessOutline(Value *Ptr, bool IsWrite,
IRBuilder<> IRB(InsertBefore);
Module *M = IRB.GetInsertBlock()->getParent()->getParent();
- bool useFixedShadowIntrinsic = false;
+ bool UseFixedShadowIntrinsic = false;
// The memaccess fixed shadow intrinsic is only supported on AArch64,
// which allows a 16-bit immediate to be left-shifted by 32.
// Since kShadowBaseAlignment == 32, and Linux by default will not
@@ -999,11 +999,12 @@ void HWAddressSanitizer::instrumentMemAccessOutline(Value *Ptr, bool IsWrite,
// In particular, an offset of 4TB (1024 << 32) is representable, and
// ought to be good enough for anybody.
if (TargetTriple.isAArch64() && Mapping.Offset != kDynamicShadowSentinel) {
- uint16_t offset_shifted = Mapping.Offset >> 32;
- useFixedShadowIntrinsic = (uint64_t)offset_shifted << 32 == Mapping.Offset;
+ uint16_t OffsetShifted = Mapping.Offset >> 32;
+ UseFixedShadowIntrinsic =
+ static_cast<uint64_t>(OffsetShifted) << 32 == Mapping.Offset;
}
- if (useFixedShadowIntrinsic)
+ if (UseFixedShadowIntrinsic)
IRB.CreateCall(
Intrinsic::getDeclaration(
M, UseShortGranules
More information about the llvm-commits
mailing list