diff options
author | David Blaikie <dblaikie@gmail.com> | 2017-07-30 15:15:58 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2017-07-30 15:15:58 +0000 |
commit | a62f1cb1fa827c07c80408a0b17e86a398d190d3 (patch) | |
tree | e422655539cc19ac69b9a4d61f9b5fee50fb8f3d /llvm/lib/DebugInfo | |
parent | 9c626282da37527da90cf95644be81ff6d006e82 (diff) | |
download | bcm5719-llvm-a62f1cb1fa827c07c80408a0b17e86a398d190d3.tar.gz bcm5719-llvm-a62f1cb1fa827c07c80408a0b17e86a398d190d3.zip |
DebugInfo: Fix for CU index usage in 309507
Not sure quite how I failed so clearly to test this, but anyway.
llvm-svn: 309514
Diffstat (limited to 'llvm/lib/DebugInfo')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFContext.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp index d8121912a30..e8409442d2f 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp @@ -400,10 +400,12 @@ void DWARFContext::dump(raw_ostream &OS, DIDumpOptions DumpOpts) { } DWARFCompileUnit *DWARFContext::getDWOCompileUnitForHash(uint64_t Hash) { + parseDWOCompileUnits(); + if (const auto &CUI = getCUIndex()) { if (const auto *R = CUI.getFromHash(Hash)) if (auto CUOff = R->getOffset(DW_SECT_INFO)) - return CUs.getUnitForOffset(CUOff->Offset); + return DWOCUs.getUnitForOffset(CUOff->Offset); return nullptr; } |