summaryrefslogtreecommitdiff
path: root/lib/DebugInfo/DWARFContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/DebugInfo/DWARFContext.cpp')
-rw-r--r--lib/DebugInfo/DWARFContext.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/DebugInfo/DWARFContext.cpp b/lib/DebugInfo/DWARFContext.cpp
index 4fc0b301be..e1ac398b10 100644
--- a/lib/DebugInfo/DWARFContext.cpp
+++ b/lib/DebugInfo/DWARFContext.cpp
@@ -141,10 +141,8 @@ DWARFCompileUnit *DWARFContext::getCompileUnitForOffset(uint32_t offset) {
}
DILineInfo DWARFContext::getLineInfoForAddress(uint64_t address) {
- // First, get the index for the arange.
- uint32_t arangeIndex = getDebugAranges()->findAddress(address);
- // From there, get the offset of the compile unit.
- uint32_t cuOffset = getDebugAranges()->offsetAtIndex(arangeIndex);
+ // First, get the offset of the compile unit.
+ uint32_t cuOffset = getDebugAranges()->findAddress(address);
// Retrieve the compile unit.
DWARFCompileUnit *cu = getCompileUnitForOffset(cuOffset);
if (!cu)