Commit 170ac39
committed
[CIR] Add support for CK_AtomicToNonAtomic casts
Handle implicit casts from _Atomic T to T by treating them the
same as NonAtomicToAtomic casts - just visit the subexpression.
This matches the traditional CodeGen approach and enables the
cast infrastructure for C11/C++11 _Atomic types.
Note: Full atomic load/store support remains NYI and will be
addressed in follow-up work. This commit only implements the
cast operation itself.
Test: clang/test/CIR/CodeGen/atomic-type-casts.cpp
ghstack-source-id: a07a388
Pull-Request: #19891 parent dc08bd8 commit 170ac39
File tree
2 files changed
+45
-1
lines changed- clang
- lib/CIR/CodeGen
- test/CIR/CodeGen
2 files changed
+45
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1710 | 1710 | | |
1711 | 1711 | | |
1712 | 1712 | | |
1713 | | - | |
1714 | 1713 | | |
1715 | 1714 | | |
1716 | 1715 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
0 commit comments