aboutsummaryrefslogtreecommitdiff
path: root/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/DebugInfo/DWARF/DWARFCompileUnit.cpp')
-rw-r--r--lib/DebugInfo/DWARF/DWARFCompileUnit.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp b/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp
index 948972f8f136..6e550f2e9ec9 100644
--- a/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp
+++ b/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp
@@ -18,8 +18,10 @@ using namespace llvm;
void DWARFCompileUnit::dump(raw_ostream &OS) {
OS << format("0x%08x", getOffset()) << ": Compile Unit:"
<< " length = " << format("0x%08x", getLength())
- << " version = " << format("0x%04x", getVersion())
- << " abbr_offset = " << format("0x%04x", getAbbreviations()->getOffset())
+ << " version = " << format("0x%04x", getVersion());
+ if (getVersion() >= 5)
+ OS << " unit_type = " << dwarf::UnitTypeString(getUnitType());
+ OS << " abbr_offset = " << format("0x%04x", getAbbreviations()->getOffset())
<< " addr_size = " << format("0x%02x", getAddressByteSize())
<< " (next unit at " << format("0x%08x", getNextUnitOffset())
<< ")\n";