[PATCH] D37162: [CodeView] Don't output S_UDT records for incomplete typedefs

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 18:13:50 PDT 2017


rnk added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:2205
+/// encountering a situation where we want to emit an S_UDT, but all we have
+/// seen so far is a forward decl of the type that the S_UDT refers to.  For
+/// example, consider this code:
----------------
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.

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.


https://reviews.llvm.org/D37162





More information about the llvm-commits mailing list