summaryrefslogtreecommitdiffstats
path: root/lib/DebugInfo/DWARFContext.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-09-15 21:59:13 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-09-15 21:59:13 +0000
commit9013db3399d2847899ba32daf58844bba1aef6dd (patch)
tree4272f2b367e3a90843b6c6676f84d566c7e1a371 /lib/DebugInfo/DWARFContext.cpp
parent7ecedac8b726926cce5758b791c5e78caff8b5ad (diff)
downloadexternal_llvm-9013db3399d2847899ba32daf58844bba1aef6dd.zip
external_llvm-9013db3399d2847899ba32daf58844bba1aef6dd.tar.gz
external_llvm-9013db3399d2847899ba32daf58844bba1aef6dd.tar.bz2
DWARF: Reset the state after parsing a line table prologue and remove an unnecessary lookup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139859 91177308-0d34-0410-b5e6-96231b3b80d8
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 4fc0b30..e1ac398 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)