mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
DebugInfo: Partial implementation of DWARF type units.
Emit DW_TAG_type_units into the debug_info section using compile unit headers. This is bogus/unusable by debuggers, but testable and provides more isolated review. Subsequent patches will include support for type unit headers and emission into the debug_types section, as well as comdat grouping the types based on their hash. Also the CompileUnit type will be renamed 'Unit' and relevant portions pulled out into respective CompileUnit and TypeUnit types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195166 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -92,10 +92,12 @@ void DIEHash::addParentContext(const DIE &Parent) {
|
||||
// outermost such construct...
|
||||
SmallVector<const DIE *, 1> Parents;
|
||||
const DIE *Cur = &Parent;
|
||||
while (Cur->getTag() != dwarf::DW_TAG_compile_unit) {
|
||||
while (Cur->getParent()) {
|
||||
Parents.push_back(Cur);
|
||||
Cur = Cur->getParent();
|
||||
}
|
||||
assert(Cur->getTag() == dwarf::DW_TAG_compile_unit ||
|
||||
Cur->getTag() == dwarf::DW_TAG_type_unit);
|
||||
|
||||
// Reverse iterate over our list to go from the outermost construct to the
|
||||
// innermost.
|
||||
|
Reference in New Issue
Block a user