Skip to content

Commit f2a780b

Browse files
authored
[lldb][test] Make delayed-definition-die-searching CU-layout agnostic (#201206)
The second `ParseTypeFromDWARF` for t1 (after `p v2`) only fires when t1's definition lives in a separate CU from its forward declaration: LLDB parses the forward-decl DIE during `p v1` and a distinct definition DIE during `p v2`. dsymutil's parallel linker collapses both into a single DIE in the artificial type unit, so t1 is parsed once during `p v1` and only re-resolved during `p v2`. Drop the second-parse CHECK so the test no longer presumes a per-CU type layout. The remaining `'t1' resolving forward declaration...` CHECK after `p v2` still verifies what the test was designed to catch: t1's complete-type resolution is deferred until v2 is evaluated. If LLDB regressed to eager resolution during `p v1`, that log line would move and the test would fail. Add a `(t1) (x = 0)` CHECK at the end to cover the end-to-end value.
1 parent 40ad00b commit f2a780b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lldb/test/Shell/SymbolFile/DWARF/delayed-definition-die-searching.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# CHECK: DW_TAG_structure_type (DW_TAG_structure_type) 't2<t1>' resolving forward declaration...
1313
# CHECK: (t2<t1>) {}
1414
# CHECK: (lldb) p v2
15-
# CHECK: DWARFASTParserClang::ParseTypeFromDWARF{{.*}}DW_TAG_structure_type (DW_TAG_structure_type) name = 't1'
1615
# CHECK: DW_TAG_structure_type (DW_TAG_structure_type) 't1' resolving forward declaration...
16+
# CHECK: (t1) (x = 0)
1717

1818
#--- lldb.cmd
1919
log enable dwarf comp

0 commit comments

Comments
 (0)