diff options
| author | Alexey Lapshin <a.v.lapshin@mail.ru> | 2019-12-10 13:00:19 +0300 |
|---|---|---|
| committer | Alexey Lapshin <a.v.lapshin@mail.ru> | 2019-12-12 10:59:10 +0300 |
| commit | 71aaebc82468c8982b6d80bb35cbafed6dea91cc (patch) | |
| tree | 339e1f09b27e6a23483ee3ae0808bbd1a8f966f1 /llvm/lib/DebugInfo | |
| parent | f8ff3bf55b26673ff3f3857fd17031ea27478ebe (diff) | |
| download | bcm5719-llvm-71aaebc82468c8982b6d80bb35cbafed6dea91cc.tar.gz bcm5719-llvm-71aaebc82468c8982b6d80bb35cbafed6dea91cc.zip | |
[DWARF5][DWARFVerifier] Check that Skeleton compilation unit does not have children.
That patch adds checking into DWARFVerifier that the Skeleton
compilation unit does not have children.
Differential Revision: https://reviews.llvm.org/D71244
Diffstat (limited to 'llvm/lib/DebugInfo')
| -rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp index a8f95043fc8..42e688cc39b 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp @@ -196,6 +196,14 @@ unsigned DWARFVerifier::verifyUnitContents(DWARFUnit &Unit) { NumUnitErrors++; } + // According to DWARF Debugging Information Format Version 5, + // 3.1.2 Skeleton Compilation Unit Entries: + // "A skeleton compilation unit has no children." + if (Die.getTag() == dwarf::DW_TAG_skeleton_unit && Die.hasChildren()) { + error() << "Skeleton compilation unit has children.\n"; + NumUnitErrors++; + } + DieRangeInfo RI; NumUnitErrors += verifyDieRanges(Die, RI); |

