[PATCH] D21939: Emit CodeView type records for nested classes
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 1 14:50:24 PDT 2016
rnk added inline comments.
================
Comment at: lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:1568
@@ +1567,3 @@
+ for (const DICompositeType *Nested : Info.NestedClasses) {
+ /* What to do with the type index? */ lowerCompleteTypeClass(Nested);
+ }
----------------
This should probably be `Fields.writeNestedType(getTypeIndex(Nested))`. The idea is that you should always be able to call getTypeIndex, and if that happens to reference a complete record type, we defer its emission until some time later. getTypeIndex also maintains the map from DINode* to TypeIndex, and directly calling the lower* methods bypasses that.
I should write comments in CodeViewDebug.h about this!
================
Comment at: test/DebugInfo/COFF/types-nested-class.ll:28
@@ +27,3 @@
+; CHECK: FieldList (0x1001) {
+; CHECK: TypeLeafKind: LF_FIELDLIST (0x1203)
+; CHECK: }
----------------
We should see a NestedType record in A's FieldList. Right now both A and A::Nested are empty, so they share the same field list. :)
http://reviews.llvm.org/D21939
More information about the llvm-commits
mailing list