[PATCH] D18875: NFC: unify clang / LLVM atomic ordering

Richard Smith via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 16:02:21 PDT 2016


rsmith added a subscriber: rsmith.

================
Comment at: include/llvm/Support/AtomicOrdering.h:23-34
@@ +22,14 @@
+
+/// Atomic ordering for C11 / C++11's memody models.
+///
+/// These values cannot change because they are shared with standard library
+/// implementations as well as with other compilers.
+enum class AtomicOrderingCABI {
+  relaxed = 0,
+  consume = 1,
+  acquire = 2,
+  release = 3,
+  acq_rel = 4,
+  seq_cst = 5,
+};
+
----------------
Why does LLVM need to know about these? It seems like they're specific to the frontend. Is there some way in which they're not? (Is some upcoming change going to use these from LLVM?)

What happens if some C ABI picks different values?


http://reviews.llvm.org/D18875





More information about the llvm-commits mailing list