aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/DWARFUnit.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-04-24 23:08:56 +0000
committerAlexey Samsonov <samsonov@google.com>2014-04-24 23:08:56 +0000
commit19f76f25e99da68f28e5db4668ccccbeec57562a (patch)
treecc3b08e3ee3c6d862055c238ee2ddb33526038fe /llvm/lib/DebugInfo/DWARFUnit.cpp
parent02fefcfc3bc205abd9e4848d0e285c41fdbfc014 (diff)
downloadllvm-19f76f25e99da68f28e5db4668ccccbeec57562a.zip
llvm-19f76f25e99da68f28e5db4668ccccbeec57562a.tar.gz
llvm-19f76f25e99da68f28e5db4668ccccbeec57562a.tar.bz2
[DWARF parser] Make a few methods non-public
llvm-svn: 207156
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFUnit.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARFUnit.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/DWARFUnit.cpp b/llvm/lib/DebugInfo/DWARFUnit.cpp
index 41b6a25..c49020a 100644
--- a/llvm/lib/DebugInfo/DWARFUnit.cpp
+++ b/llvm/lib/DebugInfo/DWARFUnit.cpp
@@ -168,13 +168,13 @@ void DWARFUnit::extractDIEsToVector(
// Set the offset to that of the first DIE and calculate the start of the
// next compilation unit header.
- uint32_t Offset = getFirstDIEOffset();
+ uint32_t DIEOffset = Offset + getHeaderSize();
uint32_t NextCUOffset = getNextUnitOffset();
DWARFDebugInfoEntryMinimal DIE;
uint32_t Depth = 0;
bool IsCUDie = true;
- while (Offset < NextCUOffset && DIE.extractFast(this, &Offset)) {
+ while (DIEOffset < NextCUOffset && DIE.extractFast(this, &DIEOffset)) {
if (IsCUDie) {
if (AppendCUDie)
Dies.push_back(DIE);
@@ -207,9 +207,9 @@ void DWARFUnit::extractDIEsToVector(
// Give a little bit of info if we encounter corrupt DWARF (our offset
// should always terminate at or before the start of the next compilation
// unit header).
- if (Offset > NextCUOffset)
+ if (DIEOffset > NextCUOffset)
fprintf(stderr, "warning: DWARF compile unit extends beyond its "
- "bounds cu 0x%8.8x at 0x%8.8x'\n", getOffset(), Offset);
+ "bounds cu 0x%8.8x at 0x%8.8x'\n", getOffset(), DIEOffset);
}
size_t DWARFUnit::extractDIEsIfNeeded(bool CUDieOnly) {