[PATCH] D28386: Add the ability to iterate across all attributes in a DIE.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 10 11:40:34 PST 2017


dblaikie added inline comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFFormValue.cpp:401
     default:
+      assert(false && "unsupported form");
       return false;
----------------
clayborg wrote:
> This is not unreachable. Newer DWARF might be passed to this at some point and it needs to fail correctly and just not parse the DIE which will cause all DIEs in a DWARFUnit to not be parsed or returned.
Then there cannot be an assert(false) here. There must be a test case demonstrating that this situation is correctly handled (with a hardcoded unknown form).

But shouldn't the failure have surfaced earlier - never reaching the code that would attempt to parse the value in the DIE? The attempt to walk the DIE would fail because the size could not be determined for an unknown form.


https://reviews.llvm.org/D28386





More information about the llvm-commits mailing list