This is the final step in getting nested classes/structs into the type records in CodeView. Includes a simple test.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | ||
---|---|---|
1568 ↗ | (On Diff #62544) | 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! |
test/DebugInfo/COFF/types-nested-class.ll | ||
28 ↗ | (On Diff #62544) | 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. :) |
Oh, you should also set ClassOptions::ContainsNestedClass if the nested type list is non-empty.
We should also set ClassOptions::Nested if the scope of a class is a DICompositeType.
test/DebugInfo/COFF/types-nested-class.ll | ||
---|---|---|
28 ↗ | (On Diff #62544) | OK, that surprises me, but OK. I wouldn't have expected a type in the field list. |
Now includes the nested type in the field list (and includes it in the member count).
lgtm
test/DebugInfo/COFF/types-nested-class.ll | ||
---|---|---|
28 ↗ | (On Diff #62544) | Yeah, I would've called it "member" list, but I was trying to stay closer to their terminology. |