diff options
author | Oliver Stannard <oliver.stannard@arm.com> | 2024-12-19 09:12:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-19 09:12:19 +0000 |
commit | 9fc2fadbfcb34df5f72bdaed28a7874bf584eed7 (patch) | |
tree | 6b5b2dfbf4659d5bb820e3dfe5c4ec8dc6553186 /clang/lib/CodeGen/ModuleBuilder.cpp | |
parent | beea5acc5e7d17a29e48f5dc627019e4db510e23 (diff) | |
download | llvm-9fc2fadbfcb34df5f72bdaed28a7874bf584eed7.zip llvm-9fc2fadbfcb34df5f72bdaed28a7874bf584eed7.tar.gz llvm-9fc2fadbfcb34df5f72bdaed28a7874bf584eed7.tar.bz2 |
[Clang] Re-write codegen for atomic_test_and_set and atomic_clear (#120449)
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 #111293.
Diffstat (limited to 'clang/lib/CodeGen/ModuleBuilder.cpp')
0 files changed, 0 insertions, 0 deletions