diff options
author | Fangrui Song <i@maskray.me> | 2023-12-14 11:03:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-14 11:03:28 -0800 |
commit | fed564432cef76f8b303c19ab1dfc0a14878fbc3 (patch) | |
tree | ffa392c614b3c37bfc7a30f962395e28642f5d9b /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 419c45a3252489d0ebac4535fe5a4ed9a6af6bbd (diff) | |
download | llvm-fed564432cef76f8b303c19ab1dfc0a14878fbc3.zip llvm-fed564432cef76f8b303c19ab1dfc0a14878fbc3.tar.gz llvm-fed564432cef76f8b303c19ab1dfc0a14878fbc3.tar.bz2 |
[Sema] atomic_compare_exchange: check failure memory order (#74959)
For
`__atomic_compare_exchange{,_n}/__c11_atomic_compare_exchange_{strong,weak}`,
GCC checks both the success memory order and the failure memory order
under the default -Winvalid-memory-model ("memory model" is confusing
here and "memory order" is much more common in the atomic context).
* The failure memory order, if a constant, must be one of
relaxed/consume/acquire/seq_cst.
Clang checks just the success memory order under the default
-Watomic-memory-ordering. This patch checks the failure memory order.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions