[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 15 04:15:53 PST 2023


================
@@ -904,6 +904,32 @@ BUILTIN(__atomic_signal_fence, "vi", "n")
 BUILTIN(__atomic_always_lock_free, "bzvCD*", "nE")
 BUILTIN(__atomic_is_lock_free, "bzvCD*", "nE")
 
+// GNU atomic builtins with atomic scopes.
+ATOMIC_BUILTIN(__scoped_atomic_load, "v.", "t")
----------------
jhuber6 wrote:

Naming things is hard, we could do
```
__atomic_scoped_load
__scoped_atomic_load
__atomic_load_scoped
```
Unsure which is the best.

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


More information about the cfe-commits mailing list