Commit d0a1d1e
committed
[CIR][Bugfix] Fix cir.array getTypeSizeInBits method
Constant initialization of static local arrays would fail due to a
mismatch between the variable and the initializer type size. This patch
fixes the data layout interface implementation for the cir.array type.
A complete array in C/C++ should have its type size in bits equal to
the size of the array times the size of the element type.
[ghstack-poisoned]1 parent 368e7d9 commit d0a1d1e
File tree
2 files changed
+7
-1
lines changed- clang
- lib/CIR/Dialect/IR
- test/CIR/CodeGen
2 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
0 commit comments