aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/DWARFDebugLine.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-09-15 20:43:22 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-09-15 20:43:22 +0000
commit2602ca67e89b9b9f309ef3b2b4181d65b67acb0f (patch)
tree1f5352fda8a1cba550bc86ca3eac9ffdbb906d78 /llvm/lib/DebugInfo/DWARFDebugLine.cpp
parent679e1752f81e21c40392ff90aaaabbe9596ef07f (diff)
downloadllvm-2602ca67e89b9b9f309ef3b2b4181d65b67acb0f.zip
llvm-2602ca67e89b9b9f309ef3b2b4181d65b67acb0f.tar.gz
llvm-2602ca67e89b9b9f309ef3b2b4181d65b67acb0f.tar.bz2
DWARF: Put all the pieces we have together and provide a single accessor to DIContext that provides line information when given an address.
llvm-svn: 139836
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFDebugLine.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARFDebugLine.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARFDebugLine.cpp
index 941d881..94fff65 100644
--- a/llvm/lib/DebugInfo/DWARFDebugLine.cpp
+++ b/llvm/lib/DebugInfo/DWARFDebugLine.cpp
@@ -122,7 +122,9 @@ DWARFDebugLine::getOrParseLineTable(DataExtractor debug_line_data,
State state;
if (!parseStatementTable(debug_line_data, &offset, state))
return 0;
- pos->second = state;
+ // FIXME: double lookup.
+ LineTableMap[offset] = state;
+ return &LineTableMap[offset];
}
return &pos->second;
}