[Lldb-commits] [lldb] [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #90663)
Zequan Wu via lldb-commits
lldb-commits at lists.llvm.org
Tue May 7 08:26:09 PDT 2024
================
@@ -0,0 +1,40 @@
+# Test definition DIE searching is delayed until complete type is required.
+
+# RUN: split-file %s %t
+# RUN: %clangxx_host %t/main.cpp %t/t1_def.cpp -g -gsimple-template-names -o %t.out
+# RUN: %lldb -b %t.out -s %t/lldb.cmd | FileCheck %s
+
+# CHECK: (lldb) p v1
+# CHECK-NEXT: DWARFASTParserClang::ParseTypeFromDWARF{{.*}}DW_TAG_structure_type (DW_TAG_structure_type) name = 't2'
----------------
ZequanWu wrote:
Updated to use `CHECK`. Unfortunately, it doesn't work with `image dump ast` because this change doesn't affect when type completion happens. So, after `p v1`, w/wo this change, lldb just creates `ClassTemplateSpecializationDecl` for `t1<int>` with no definition. When doing `p v2', lldb tries to complete the `t1<int>` decl. This change only moves the definition searching to the time when completing a type.
https://github.com/llvm/llvm-project/pull/90663
More information about the lldb-commits
mailing list