Add constant array support for __builtin_dump_sturct. For N-dimensional arrays, the new dumpArray function dumps the elements of the array by generating N layers of 'for' loops.
for example:
The struct:
struct Foo {
int x;
};
struct S {
int a[3];
int b[2][2];
struct Foo c[2];
};The dump result:
struct S {
int[3] a = [
[0] = 1
[1] = 2
[2] = 3
]
int[2][2] b = [
[0] = [
[0] = 1
[1] = 2
]
[1] = [
[0] = 3
[1] = 4
]
]
struct Foo[2] c = [
[0] = {
int x = 1
}
[1] = {
int x = 2
}
]
}
Instead of this initialization, can we make this a constexpr constructor/collection of some sort and instantiate it inline?