[DWARF] Make llvm-dwarfdump display the .debug_loc.dwo section. Fixes PR38991.
Reviewer: dblaikie
Differential Revision: https://reviews.llvm.org/D52444
llvm-svn: 344068
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index 118a2eb..ddabc7a 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -692,11 +692,10 @@
LocDWO.reset(new DWARFDebugLocDWO());
// Assume all compile units have the same address byte size.
- if (getNumCompileUnits()) {
- DataExtractor LocData(DObj->getLocDWOSection().Data, isLittleEndian(),
- getUnitAtIndex(0)->getAddressByteSize());
- LocDWO->parse(LocData);
- }
+ // FIXME: We don't need AddressSize for split DWARF since relocatable
+ // addresses cannot appear there. At the moment DWARFExpression requires it.
+ DataExtractor LocData(DObj->getLocDWOSection().Data, isLittleEndian(), 4);
+ LocDWO->parse(LocData);
return LocDWO.get();
}