[compiler-rt] [Sanitizer][NFC] Fix up comment in atomic_store of sanitizer_atomic_c… (PR #79740)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 28 00:36:58 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Enna1 (Enna1)
<details>
<summary>Changes</summary>
…lang_*.h
---
Full diff: https://github.com/llvm/llvm-project/pull/79740.diff
2 Files Affected:
- (modified) compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_other.h (+1-1)
- (modified) compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_x86.h (+1-1)
``````````diff
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) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/79740
More information about the llvm-commits
mailing list