[PATCH] D88522: [DebugInfo] Add types from constructor homing to the retained types list.
Amy Huang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 29 17:01:11 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5c4fc581d5fe: [DebugInfo] Add types from constructor homing to the retained types list. (authored by akhuang).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88522/new/
https://reviews.llvm.org/D88522
Files:
clang/lib/CodeGen/CGDebugInfo.cpp
clang/test/CodeGenCXX/debug-info-limited-ctor.cpp
Index: clang/test/CodeGenCXX/debug-info-limited-ctor.cpp
===================================================================
--- clang/test/CodeGenCXX/debug-info-limited-ctor.cpp
+++ clang/test/CodeGenCXX/debug-info-limited-ctor.cpp
@@ -9,7 +9,7 @@
B();
} TestB;
-// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "C"{{.*}}DIFlagTypePassByValue
+// CHECK-DAG: ![[C:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "C"{{.*}}DIFlagTypePassByValue
struct C {
C() {}
} TestC;
@@ -73,3 +73,7 @@
void L() {
auto func = [&]() {};
}
+
+// Check that types are being added to retained types list.
+// CHECK-DAG: !DICompileUnit{{.*}}retainedTypes: ![[RETAINED:[0-9]+]]
+// CHECK-DAG: ![[RETAINED]] = {{.*}}![[C]]
Index: clang/lib/CodeGen/CGDebugInfo.cpp
===================================================================
--- clang/lib/CodeGen/CGDebugInfo.cpp
+++ clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1726,7 +1726,7 @@
// info is emitted.
if (DebugKind == codegenoptions::DebugInfoConstructor)
if (const CXXConstructorDecl *CD = dyn_cast<CXXConstructorDecl>(Method))
- completeClass(CD->getParent());
+ completeUnusedClass(*CD->getParent());
llvm::DINodeArray TParamsArray = CollectFunctionTemplateParams(Method, Unit);
llvm::DISubprogram *SP = DBuilder.createMethod(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88522.295152.patch
Type: text/x-patch
Size: 1341 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200930/2eebb665/attachment-0001.bin>
More information about the cfe-commits
mailing list