[libc-commits] [libc] [libc][CPP] correct cmpxchg failure ordering inference (PR #133127)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Wed Mar 26 10:29:28 PDT 2025


================
@@ -252,6 +260,14 @@ template <typename T> struct AtomicRef {
     return static_cast<int>(mem_scope);
   }
 
+  LIBC_INLINE static constexpr int infer_failure_order(MemoryOrder mem_ord) {
----------------
jhuber6 wrote:

Yeah but this doesn't need to be in the same class, it's a constexpr utility that can just be declared at the top.

https://github.com/llvm/llvm-project/pull/133127


More information about the libc-commits mailing list