[llvm] r309514 - DebugInfo: Fix for CU index usage in 309507
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 30 08:15:58 PDT 2017
Author: dblaikie
Date: Sun Jul 30 08:15:58 2017
New Revision: 309514
URL: http://llvm.org/viewvc/llvm-project?rev=309514&view=rev
Log:
DebugInfo: Fix for CU index usage in 309507
Not sure quite how I failed so clearly to test this, but anyway.
Modified:
llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp?rev=309514&r1=309513&r2=309514&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp Sun Jul 30 08:15:58 2017
@@ -400,10 +400,12 @@ void DWARFContext::dump(raw_ostream &OS,
}
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;
}
More information about the llvm-commits
mailing list