[PATCH] D28303: Add iterator support to DWARFDie to allow child DIE iteration.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 15:46:16 PST 2017


dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

One minor comment.

Also would still love to hear from Chris about testing more interesting cases of non-trivial DWARF and API interactions. I mean perhaps we'll end up with all parsing failures testable with llvm-dwarfdump and something like obj2yaml, then all API interactions we'll test with the DWARF generation APIs and make sure they can express all valid DWARF. (though I'm wondering at that point if it wouldn't be better for us to just create the DWARF objects directly - in fact, in this case we could do that, perhaps - rather than parsing DWARF, we could just create the DWARF parser API objects directly and check that the accessors all work, etc)



================
Comment at: unittests/DebugInfo/DWARF/DwarfGenerator.cpp:112
+void dwarfgen::DIE::setForceChildren() {
+  if (Die)
+    Die->setForceChildren(true);
----------------
Is this conditional needed - or do we generally assume it's an invariant that the Die is non-null for most of the operations on dwarfgen::DIE?


https://reviews.llvm.org/D28303





More information about the llvm-commits mailing list