[PATCH] D32498: [CodeView] omit forward references for unnamed structs and unions
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 12 14:59:18 PDT 2017
rnk added a comment.
I think I've convinced myself that it's impossible to create a cycle in the C type graph. I'll sleep better if you check for an empty identifier in addition to an empty name on the DICompositeType. That is essentially a proxy for "is this a C++ type" because all C++ types have identifiers, which are effectively mangled names.
However, it's still possible to construct a .ll file that has a cycle by taking a C++ example with a cycle (consider any unnamed struct with a method) and removing the name and identifier. We should add that as an LLVM test and make sure we gracefully detect it and error out. Calling either report_fatal_error or the LLVMContext dianostic handler would be fine, and should be testable in lit.
https://reviews.llvm.org/D32498
More information about the llvm-commits
mailing list