[compiler-rt] 5f17fcf - [NFC][tsan] Use sizeof instead of ARRAY_SIZE
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 24 19:49:36 PDT 2023
Author: Vitaly Buka
Date: 2023-09-24T19:48:22-07:00
New Revision: 5f17fcf3010a8393658d38b41a73c9ef8e06bf6d
URL: https://github.com/llvm/llvm-project/commit/5f17fcf3010a8393658d38b41a73c9ef8e06bf6d
DIFF: https://github.com/llvm/llvm-project/commit/5f17fcf3010a8393658d38b41a73c9ef8e06bf6d.diff
LOG: [NFC][tsan] Use sizeof instead of ARRAY_SIZE
It's the same for char, but it's more appropriate here.
Added:
Modified:
compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
index df040b38658217d..d161fa8d217e8c0 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
@@ -209,7 +209,7 @@ static NOINLINE void MapRodata(char* buffer, uptr size) {
void InitializeShadowMemoryPlatform() {
char buffer[256]; // Keep in a
diff erent frame.
- MapRodata(buffer, ARRAY_SIZE(buffer));
+ MapRodata(buffer, sizeof(buffer));
}
#endif // #if !SANITIZER_GO
More information about the llvm-commits
mailing list