aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/Cuda.cpp
diff options
context:
space:
mode:
authorOliver Stannard <oliver.stannard@arm.com>2025-01-22 10:48:04 +0000
committerGitHub <noreply@github.com>2025-01-22 10:48:04 +0000
commitc4ef805b0bda16f734276086b0984583c2e21db6 (patch)
tree5b31bbdc6eb69e483cb90c70afb4cc0eb881083f /clang/lib/Basic/Cuda.cpp
parent58be6fd1b4f6f0697148edda63e30ec0f74d412a (diff)
downloadllvm-c4ef805b0bda16f734276086b0984583c2e21db6.zip
llvm-c4ef805b0bda16f734276086b0984583c2e21db6.tar.gz
llvm-c4ef805b0bda16f734276086b0984583c2e21db6.tar.bz2
[Clang] Re-write codegen for atomic_test_and_set and atomic_clear (#121943)
Re-write the sema and codegen for the atomic_test_and_set and atomic_clear builtin functions to go via AtomicExpr, like the other atomic builtins do. This simplifies the code, because AtomicExpr already handles things like generating code for to dynamically select the memory ordering, which was duplicated for these builtins. This also fixes a few crash bugs, one when passing an integer to the pointer argument, and one when using an array. This also adds diagnostics for the memory orderings which are not valid for atomic_clear according to https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html, which were missing before. Fixes https://github.com/llvm/llvm-project/issues/111293. This is a re-land of #120449, modified to allow any non-const pointer type for the first argument.
Diffstat (limited to 'clang/lib/Basic/Cuda.cpp')
0 files changed, 0 insertions, 0 deletions