if (!IndexEntry && IsDWO) {
const DWARFUnitIndex &Index = getDWARFUnitIndex(
Context, Header.isTypeUnit() ? DW_SECT_EXT_TYPES : DW_SECT_INFO);
- IndexEntry = Index.getFromOffset(Header.getOffset());
+ if (Index) {
+ if (Header.isTypeUnit())
+ IndexEntry = Index.getFromHash(Header.getTypeHash());
+ else if (auto DWOId = Header.getDWOId())
+ IndexEntry = Index.getFromHash(*DWOId);
+ }
+ if (!IndexEntry)
+ IndexEntry = Index.getFromOffset(Header.getOffset());
}
if (IndexEntry && !Header.applyIndexEntry(IndexEntry))
return nullptr;
.byte 2 # DWARF Unit Type
.byte 8 # Address Size (in bytes)
.long .debug_abbrev.dwo # Offset Into Abbrev. Section
- .quad 0x0011223344556677 # Type Signature
+ .quad 0xeeaaddbbaabbeedd # Type Signature
.long TU1_5_type-TU1_5_start # Type offset
# The type-unit DIE, which has a name.
.byte 2 # Abbreviation code
.byte 2 # DWARF Unit Type
.byte 8 # Address Size (in bytes)
.long .debug_abbrev.dwo # Offset Into Abbrev. Section
- .quad 0x00aabbccddeeff99 # Type Signature
+ .quad 0x00ffeeffaaff00ff # Type Signature
.long TU2_5_type-TU2_5_start # Type offset
# The type-unit DIE, which has a name.
.byte 2 # Abbreviation code