summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARFDebugAranges.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFDebugAranges.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARFDebugAranges.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/DWARFDebugAranges.cpp b/llvm/lib/DebugInfo/DWARFDebugAranges.cpp
index dfab7886b57..08864a06021 100644
--- a/llvm/lib/DebugInfo/DWARFDebugAranges.cpp
+++ b/llvm/lib/DebugInfo/DWARFDebugAranges.cpp
@@ -58,8 +58,13 @@ void DWARFDebugAranges::generate(DWARFContext *CTX) {
// manually build aranges for the rest of them.
for (const auto &CU : CTX->compile_units()) {
uint32_t CUOffset = CU->getOffset();
- if (ParsedCUOffsets.insert(CUOffset).second)
- CU->buildAddressRangeTable(this, true, CUOffset);
+ if (ParsedCUOffsets.insert(CUOffset).second) {
+ DWARFAddressRangesVector CURanges;
+ CU->collectAddressRanges(CURanges);
+ for (const auto &R : CURanges) {
+ appendRange(CUOffset, R.first, R.second);
+ }
+ }
}
sortAndMinimize();
OpenPOWER on IntegriCloud