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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 10:24:35 PDT 2017


On Tue, Oct 10, 2017 at 10:06 AM Jonas Devlieghere via Phabricator <
reviews at reviews.llvm.org> wrote:

> 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.
>

Not sure I understand - this code calls getDIEForOffset, which calls
getUnitForOffset as well. So why would one path be usable and the other not?


> 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
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171010/92050af4/attachment.html>


More information about the llvm-commits mailing list