[compiler-rt] a372460 - [Sanitizer][NFC] Fix up comment in atomic_store of sanitizer_atomic_clang_*.h

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 06:20:59 PST 2024


Author: Enna1
Date: 2024-01-29T15:20:55+01:00
New Revision: a372460538595d4c5a769c4c248fe7b1b4d69882

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

LOG: [Sanitizer][NFC] Fix up comment in atomic_store of sanitizer_atomic_clang_*.h

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_other.h
    compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_x86.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_other.h b/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_other.h
index 4a39889e534a00..557082a636b879 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_other.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_other.h
@@ -63,7 +63,7 @@ inline void atomic_store(volatile T *a, typename T::Type v, memory_order mo) {
   DCHECK(!((uptr)a % sizeof(*a)));
 
   if (sizeof(*a) < 8 || sizeof(void*) == 8) {
-    // Assume that aligned loads are atomic.
+    // Assume that aligned stores are atomic.
     if (mo == memory_order_relaxed) {
       a->val_dont_use = v;
     } else if (mo == memory_order_release) {

diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_x86.h b/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_x86.h
index 51597b49274128..b81a354d209872 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_x86.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_x86.h
@@ -76,7 +76,7 @@ inline void atomic_store(volatile T *a, typename T::Type v, memory_order mo) {
   DCHECK(!((uptr)a % sizeof(*a)));
 
   if (sizeof(*a) < 8 || sizeof(void*) == 8) {
-    // Assume that aligned loads are atomic.
+    // Assume that aligned stores are atomic.
     if (mo == memory_order_relaxed) {
       a->val_dont_use = v;
     } else if (mo == memory_order_release) {


        


More information about the llvm-commits mailing list