It's possible i misunderstood something since I haven't done much in this area, so i will try to write a  test case that illustrates what I'm thinking of.  Maybe I won't be able to, in which case you're right :)<br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 25, 2017 at 6:13 PM Reid Kleckner 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">rnk added inline comments.<br>
<br>
<br>
================<br>
Comment at: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:2205<br>
+/// encountering a situation where we want to emit an S_UDT, but all we have<br>
+/// seen so far is a forward decl of the type that the S_UDT refers to.  For<br>
+/// example, consider this code:<br>
----------------<br>
All this discussion of what we have and haven't seen doesn't make sense to me. As long as we keep looking at the DI metadata, we know up front what types will be complete and what types used forward decls. Clang replaces forward decls with complete DICompositeTypes when it thinks it needs one.<br>
<br>
We should be able to look at a DIType before we add it to the UDT list and say, "after looking through pointers and qualifiers, does this refer to a complete class or struct type?" If yes, add it, otherwise, don't.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D37162" rel="noreferrer" target="_blank">https://reviews.llvm.org/D37162</a><br>
<br>
<br>
<br>
</blockquote></div>