<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 10, 2017 at 10:06 AM Jonas Devlieghere via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></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>
JDevlieghere added inline comments.<br>
<br>
<br>
================<br>
Comment at: lib/DebugInfo/DWARF/DWARFVerifier.cpp:423<br>
+    // Make sure specification and abstract origin have compatible tag.<br>
+    if (auto Offset = AttrValue.Value.getAsReference()) {<br>
+<br>
----------------<br>
dblaikie wrote:<br>
> Can you use DWARFDie::getAttributeValueAsReferencedDie here, perhaps?<br>
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></blockquote><div><br>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> </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>
<br>
<br>
<a href="https://reviews.llvm.org/D38719" rel="noreferrer" target="_blank">https://reviews.llvm.org/D38719</a><br>
<br>
<br>
<br>
</blockquote></div></div>