[PATCH] D38719: [llvm-dwarfdump] Verify compatible TAG for attributes.

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 10:06:14 PDT 2017


JDevlieghere marked 2 inline comments as done.
JDevlieghere added inline comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFVerifier.cpp:423
+    // Make sure specification and abstract origin have compatible tag.
+    if (auto Offset = AttrValue.Value.getAsReference()) {
+
----------------
dblaikie wrote:
> Can you use DWARFDie::getAttributeValueAsReferencedDie here, perhaps?
Unfortunately not, because this makes use of `getUnitForOffset` which in turn uses a list of units that isn't build when doing the verification. 
Furthermore, this is (probably) slightly more efficient as we already have the attribute value and therefore do not need to do any indirections via the abbrev declaration.


https://reviews.llvm.org/D38719





More information about the llvm-commits mailing list