[PATCH] D38453: [dwarfdump] Verify that unit type matches root DIE
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 2 09:24:04 PDT 2017
JDevlieghere marked an inline comment as done.
JDevlieghere added inline comments.
================
Comment at: include/llvm/DebugInfo/DWARF/DWARFUnit.h:315
+ case dwarf::DW_UT_split_compile:
+ case dwarf::DW_UT_split_type:
+ return Tag == dwarf::DW_TAG_imported_unit;
----------------
aprantl wrote:
> Is that correct? I thought imported units are an orthogonal concept to split units. (But I may be wrong here)
Nope, this is wrong. I made this assumption before checking the standard which in its example uses a regular compile_unit. I must haveuploaded the patch before fixing this.
================
Comment at: lib/DebugInfo/DWARF/DWARFVerifier.cpp:187
+ if (!Die) {
+ error() << "Compilation unit without DIE.\n";
+ NumUnitErrors++;
----------------
aprantl wrote:
> Perhaps: `Compilation unit header without any DIEs?`
I'd be glad to change this if you think that's better. I felt like this is implicit/obvious and prevents the confusion that we might still be verifying the header. But again, I have no strong opinion about this.
Repository:
rL LLVM
https://reviews.llvm.org/D38453
More information about the llvm-commits
mailing list