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

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 16 14:02:14 PST 2023


efriedma-quic wrote:

> I figured we can just treat these as clang extensions for the time being. We already have two variants that are more or less redundant for specific use-cases, (OpenCL and HIP), which should be able to be removed after this.

I'm not sure what you mean here.  If you mean that users are expected to use the OpenCL/HIP/etc. standard APIs, and you only expect to use these as part of language runtimes, then maybe we don't care so much if it's clang-only.

------

It might be worth considering using string literals instead of numbers for the different scopes.  It removes any question of whether the list of scopes is complete and the order of of numbers on the list.  And it doesn't require defining a bunch of new preprocessor macros.

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


More information about the cfe-commits mailing list