Commit 021ebee
[CIR][CIRGen] Removes hasBooleanRepresentation (#251)
This PR removes the method `hasBooleanRepresentation` as was discussed
in [PR#233](#233)
Briefly, the `cir.bool` has the same representation in memory and after
load. The LLVM IR differs, that's why the check is there, in the origin
`CodeGen`.
Also, in order to trigger the path and make the implementation to be
conform with the original `CodeGen`, there are changes in the
`CIRGenExprScalar`: call the common `buildFromLValue` instead of manaul
`load` creation.
Also, a couple of tests for the bool load/store added1 parent b688cfc commit 021ebee
File tree
3 files changed
+34
-8
lines changed- clang
- lib/CIR/CodeGen
- test/CIR/CodeGen
3 files changed
+34
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
2210 | 2209 | | |
2211 | 2210 | | |
2212 | 2211 | | |
2213 | | - | |
2214 | | - | |
2215 | | - | |
| 2212 | + | |
| 2213 | + | |
2216 | 2214 | | |
2217 | 2215 | | |
2218 | 2216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | 215 | | |
219 | | - | |
| 216 | + | |
220 | 217 | | |
221 | 218 | | |
222 | 219 | | |
| |||
| 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 | + | |
0 commit comments