[Lldb-commits] [lldb] [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #90663)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue May 7 07:18:44 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'
----------------
labath wrote:

CHECK-NEXT on log output sounds like a very bad idea, as the test can be broken by adding a random log statement. For what you're trying to do, a plain CHECK should suffice (though i'd also consider if this can be checked using something less volatile than log messages -- for example, you might be able to use `image dump ast` to compare the clang ast of the type before/after completion).

https://github.com/llvm/llvm-project/pull/90663


More information about the lldb-commits mailing list