forked from OSchip/llvm-project
37c747498d
S_UDT records are basically the "bridge" between the debugger's expression evaluator and the type information. If you type (Foo*)nullptr into the watch window, the debugger looks for an S_UDT record named Foo. If it can find one, it displays your type. Otherwise you get an error. We have always understood this to mean that if you have code like this: struct A { int X; }; struct B { typedef A AT; AT Member; }; that you will get 3 S_UDT records. "A", "B", and "B::AT". Because if you were to type (B::AT*)nullptr into the debugger, it would need to find an S_UDT record named "B::AT". But "B::AT" is actually the S_UDT record that would be generated if B were a namespace, not a struct. So the debugger needs to be able to distinguish this case. So what it does is: 1. Look for an S_UDT named "B::AT". If it finds one, it knows that AT is in a namespace. 2. If it doesn't find one, split at the scope resolution operator, and look for an S_UDT named B. If it finds one, look up the type for B, and then look for AT as one of its members. With this algorithm, S_UDT records for nested typedefs are not just unnecessary, but actually wrong! The results of implementing this in clang are dramatic. It cuts our /DEBUG:FASTLINK PDB sizes by more than 50%, and we go from being ~20% larger than MSVC PDBs on average, to ~40% smaller. It also slightly speeds up link time. We get about 10% faster links than without this patch. Differential Revision: https://reviews.llvm.org/D37410 llvm-svn: 312583 |
||
---|---|---|
.. | ||
AArch64 | ||
AMDGPU | ||
ARM | ||
COFF | ||
Generic | ||
Inputs | ||
Lanai | ||
MIR | ||
MSP430 | ||
Mips | ||
PDB | ||
PowerPC | ||
Sparc | ||
SystemZ | ||
WebAssembly | ||
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-decompression-corrupt.test | ||
dwarfdump-decompression-error.test | ||
dwarfdump-dump-flags.test | ||
dwarfdump-dump-gdbindex.test | ||
dwarfdump-dwp.test | ||
dwarfdump-header.test | ||
dwarfdump-implicit-const.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-str-offsets-dwp.test | ||
dwarfdump-str-offsets-invalid.test | ||
dwarfdump-str-offsets.test | ||
dwarfdump-type-units.test | ||
dwarfdump-zlib.test | ||
dwo.ll | ||
invalid-relocations.test | ||
llvm-symbolizer-split-dwarf-empty.test | ||
llvm-symbolizer-zlib.test | ||
llvm-symbolizer.test | ||
macro_link.ll | ||
member-pointers.o | ||
missing-abstract-variable.o | ||
omit-empty.ll | ||
pr34186.ll | ||
skeletoncu.ll | ||
strip-DIGlobalVariable.ll | ||
strip-loop-metadata.ll | ||
typeunit-header.test | ||
unrolled-loop-remainder.ll |