mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-26 14:33:02 +02:00
d912b5cc99
This is the motivating example: struct B { int b; }; struct A { B *b; }; int f(A *p) { return p->b->b; } Clang emits complete types for both A and B because they are required to be complete, but our CodeView emission would only emit forward declarations of A and B. This was a consequence of the fact that the A* type must reference the forward declaration of A, which doesn't reference B at all. We can't eagerly emit complete definitions of A and B when we request the forward declaration's type index because of recursive types like linked lists. If we did that, our stack usage could get out of hand, and it would be possible to lower a type while attempting to lower a type, and we would need to double check if our type is already present in the TypeIndexMap after all recursive getTypeIndex calls. Instead, defer complete type emission until after all type lowering has completed. This ensures that all referenced complete types are emitted, and that type lowering is not re-entrant. llvm-svn: 273443 |
||
---|---|---|
.. | ||
AArch64 | ||
ARM | ||
COFF | ||
Generic | ||
Inputs | ||
Lanai | ||
Mips | ||
MIR | ||
PDB | ||
PowerPC | ||
Sparc | ||
SystemZ | ||
X86 | ||
arm-relocs.test | ||
debuglineinfo-macho.test | ||
debuglineinfo.test | ||
debugmacinfo.test | ||
dwarfdump-64-bit-dwarf.test | ||
dwarfdump-accel.test | ||
dwarfdump-debug-frame-simple.test | ||
dwarfdump-debug-loc-simple.test | ||
dwarfdump-dump-flags.test | ||
dwarfdump-dwp.test | ||
dwarfdump-invalid.test | ||
dwarfdump-line-dwo.test | ||
dwarfdump-macho-relocs.test | ||
dwarfdump-macho-universal.test | ||
dwarfdump-objc.test | ||
dwarfdump-pubnames.test | ||
dwarfdump-ranges.test | ||
dwarfdump-type-units.test | ||
dwarfdump-zlib.test | ||
dwo.ll | ||
llvm-symbolizer-split-dwarf-empty.test | ||
llvm-symbolizer-zlib.test | ||
llvm-symbolizer.test | ||
member-pointers.o | ||
missing-abstract-variable.o | ||
skeletoncu.ll |