diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2017-10-10 14:15:25 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2017-10-10 14:15:25 +0000 |
commit | aa6be823a450abbcabbf4241a59bffc1d4ce3143 (patch) | |
tree | 3409e3298c3b3f26c57229859dce09b667ed2c88 /llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp | |
parent | 2a0c4f57dd33c5187ed6d85f2d5be39701fe1692 (diff) | |
download | bcm5719-llvm-aa6be823a450abbcabbf4241a59bffc1d4ce3143.tar.gz bcm5719-llvm-aa6be823a450abbcabbf4241a59bffc1d4ce3143.zip |
Re-land "[llvm-dwarfdump] Print type names in DW_AT_type DIEs"
This patch adds printing for DW_AT_type DIEs like it is already the case
for DW_AT_specification DIEs. This is a rather naive approach and only a
start. We should have pretty printers for different languages.
Recommit after being reverted in r315299.
Differential revision: https://reviews.llvm.org/D36993
llvm-svn: 315316
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp index bec6e922ceb..b10697c9a31 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp @@ -262,6 +262,8 @@ bool DWARFVerifier::handleDebugInfo() { bool isUnitDWARF64 = false; bool isHeaderChainValid = true; bool hasDIE = DebugInfoData.isValidOffset(Offset); + DWARFUnitSection<DWARFTypeUnit> TUSection{}; + DWARFUnitSection<DWARFCompileUnit> CUSection{}; while (hasDIE) { OffsetStart = Offset; if (!verifyUnitHeader(DebugInfoData, &Offset, UnitIdx, UnitType, @@ -274,7 +276,6 @@ bool DWARFVerifier::handleDebugInfo() { switch (UnitType) { case dwarf::DW_UT_type: case dwarf::DW_UT_split_type: { - DWARFUnitSection<DWARFTypeUnit> TUSection{}; Unit.reset(new DWARFTypeUnit( DCtx, DObj.getInfoSection(), DCtx.getDebugAbbrev(), &DObj.getRangeSection(), DObj.getStringSection(), @@ -290,7 +291,6 @@ bool DWARFVerifier::handleDebugInfo() { // UnitType = 0 means that we are // verifying a compile unit in DWARF v4. case 0: { - DWARFUnitSection<DWARFCompileUnit> CUSection{}; Unit.reset(new DWARFCompileUnit( DCtx, DObj.getInfoSection(), DCtx.getDebugAbbrev(), &DObj.getRangeSection(), DObj.getStringSection(), |