diff --git a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp --- a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp @@ -192,7 +192,7 @@ Optional DWARFUnit::getAddrOffsetSectionItem(uint32_t Index) const { - if (IsDWO) { + if (IsDWO && !AddrOffsetSectionBase) { auto R = Context.info_section_units(); // Surprising if a DWO file has more than one skeleton unit in it - this // probably shouldn't be valid, but if a use case is found, here's where to