[compiler-rt] 7531a85 - [NFC][ASAN] Use alignof instead of constant

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 00:24:59 PDT 2023


Author: Vitaly Buka
Date: 2023-05-08T00:24:37-07:00
New Revision: 7531a8589b228c502cbd6fc526fa176a34c7e3a9

URL: https://github.com/llvm/llvm-project/commit/7531a8589b228c502cbd6fc526fa176a34c7e3a9
DIFF: https://github.com/llvm/llvm-project/commit/7531a8589b228c502cbd6fc526fa176a34c7e3a9.diff

LOG: [NFC][ASAN] Use alignof instead of constant

Added: 
    

Modified: 
    compiler-rt/lib/asan/asan_thread.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/asan/asan_thread.cpp b/compiler-rt/lib/asan/asan_thread.cpp
index ebe96a841a5c..7b2f87845a8c 100644
--- a/compiler-rt/lib/asan/asan_thread.cpp
+++ b/compiler-rt/lib/asan/asan_thread.cpp
@@ -41,7 +41,8 @@ void AsanThreadContext::OnFinished() {
 }
 
 // MIPS requires aligned address
-static ALIGNED(16) char thread_registry_placeholder[sizeof(ThreadRegistry)];
+static ALIGNED(alignof(
+    ThreadRegistry)) char thread_registry_placeholder[sizeof(ThreadRegistry)];
 static ThreadRegistry *asan_thread_registry;
 
 static Mutex mu_for_thread_context;


        


More information about the llvm-commits mailing list