[llvm] 12d8e17 - [NFC][hwasan] Add const to static array
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 25 18:37:07 PDT 2023
Author: Vitaly Buka
Date: 2023-04-25T17:53:55-07:00
New Revision: 12d8e175118901c83c1d97a990c9f13d4ae1212c
URL: https://github.com/llvm/llvm-project/commit/12d8e175118901c83c1d97a990c9f13d4ae1212c
DIFF: https://github.com/llvm/llvm-project/commit/12d8e175118901c83c1d97a990c9f13d4ae1212c.diff
LOG: [NFC][hwasan] Add const to static array
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 f98cb67481154..0f18e1452a548 100644
--- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
@@ -1036,10 +1036,10 @@ unsigned HWAddressSanitizer::retagMask(unsigned AllocaNo) {
// mask allocated (temporally) nearby. The program that generated this list
// can be found at:
// https://github.com/google/sanitizers/blob/master/hwaddress-sanitizer/sort_masks.py
- static unsigned FastMasks[] = {0, 128, 64, 192, 32, 96, 224, 112, 240,
- 48, 16, 120, 248, 56, 24, 8, 124, 252,
- 60, 28, 12, 4, 126, 254, 62, 30, 14,
- 6, 2, 127, 63, 31, 15, 7, 3, 1};
+ static const unsigned FastMasks[] = {
+ 0, 128, 64, 192, 32, 96, 224, 112, 240, 48, 16, 120,
+ 248, 56, 24, 8, 124, 252, 60, 28, 12, 4, 126, 254,
+ 62, 30, 14, 6, 2, 127, 63, 31, 15, 7, 3, 1};
return FastMasks[AllocaNo % std::size(FastMasks)];
}
More information about the llvm-commits
mailing list