Commit a144e82
[CIR][CIRGen] Implicitly zero-initialize global arrays elements
Whenever a global array is declared and initialized with fewer elements
than its size, the remaining elements are implicitly initialized with
zero. For aggregates types, such as structs, the initialization is done
through the #cir.zero attribute.
ghstack-source-id: b3d172c
Pull Request resolved: #2161 parent 8e7ed2d commit a144e82
File tree
3 files changed
+13
-2
lines changed- clang
- lib/CIR/CodeGen
- test/CIR/CodeGen
3 files changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
866 | 866 | | |
867 | 867 | | |
868 | 868 | | |
869 | | - | |
870 | | - | |
| 869 | + | |
871 | 870 | | |
872 | 871 | | |
873 | 872 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments