<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 10, 2017, at 6:24 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Oct 10, 2017 at 10:06 AM Jonas Devlieghere via Phabricator <<a href="mailto:reviews@reviews.llvm.org" class="">reviews@reviews.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">JDevlieghere marked 2 inline comments as done.<br class="">
JDevlieghere added inline comments.<br class="">
<br class="">
<br class="">
================<br class="">
Comment at: lib/DebugInfo/DWARF/DWARFVerifier.cpp:423<br class="">
+    // Make sure specification and abstract origin have compatible tag.<br class="">
+    if (auto Offset = AttrValue.Value.getAsReference()) {<br class="">
+<br class="">
----------------<br class="">
dblaikie wrote:<br class="">
> Can you use DWARFDie::getAttributeValueAsReferencedDie here, perhaps?<br class="">
Unfortunately not, because this makes use of `getUnitForOffset` which in turn uses a list of units that isn't build when doing the verification.<br class=""></blockquote><div class=""><br class="">Not sure I understand - this code calls getDIEForOffset, which calls getUnitForOffset as well. So why would one path be usable and the other not?<br class=""></div></div></div></div></blockquote><div><br class=""></div><div>I would have to double check with the code in front of me, but it uses an upper_bound to find the right unit based on the offset, and this code path doesn’t populate that list. I noticed this earlier when I was trying to understand why the name of the subroutine is shown when dumping the debug info but not when running the verifier. I think this is the result of only considering one unit at a time when verifying, but I didn’t dig much deeper once I had found the explanation. </div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br class="">
<br class="">
<br class="">
<a href="https://reviews.llvm.org/D38719" rel="noreferrer" target="_blank" class="">https://reviews.llvm.org/D38719</a><br class="">
<br class="">
<br class="">
<br class="">
</blockquote></div></div>
</div></blockquote></div><br class=""></body></html>