rnk added inline comments. ================ Comment at: lib/CodeGen/CGDebugInfo.cpp:1096 @@ +1095,3 @@ + QualType Ty = CGM.getContext().getTypeDeclType(RD); + llvm::DIType *nestedType = getOrCreateType(Ty, getOrCreateMainFile()); + elements.push_back(nestedType); ---------------- Is getOrCreateMainFile correct here? I thought we'd use `getOrCreateFile(RD->getLocation())`, like this other code: ``` llvm::DIType *CGDebugInfo::getOrCreateRecordType(QualType RTy, SourceLocation Loc) { assert(DebugKind >= codegenoptions::LimitedDebugInfo); llvm::DIType *T = getOrCreateType(RTy, getOrCreateFile(Loc)); return T; } ```
================ Comment at: test/CodeGenCXX/debug-info-ms-abi.cpp:15 @@ -14,3 +14,3 @@ // CHECK: ![[Foo:[^ ]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", // CHECK-SAME: identifier: ".?AUFoo@@" ---------------- We should check what shows up in `elements:`, something like: ``` // CHECK-SAME: elements: ![[elements:[0-9]+]] // CHECK: ![[elements]] = {![[f:[0-9]+]], ![[g:[0-9]+]], ![[h:[0-9]+]], ![[Nested:[0-9]+]]} // CHECK: ![[Nested]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Nested", ``` And we can look for [[f]], g, and h, before the DISubprograms below. https://reviews.llvm.org/D22577 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits