37 lines · plain
1# Test definition DIE searching is delayed until complete type is required.2 3# UNSUPPORTED: system-windows4 5# RUN: split-file %s %t6# RUN: %clangxx_host %t/main.cpp %t/t1_def.cpp -gdwarf -o %t.out7# RUN: %lldb -b %t.out -s %t/lldb.cmd | FileCheck %s8 9# CHECK: (lldb) p v110# CHECK: DWARFASTParserClang::ParseTypeFromDWARF{{.*}}DW_TAG_structure_type (DW_TAG_structure_type) name = 't2<t1>'11# CHECK: DWARFASTParserClang::ParseTypeFromDWARF{{.*}}DW_TAG_structure_type (DW_TAG_structure_type) name = 't1'12# CHECK: DW_TAG_structure_type (DW_TAG_structure_type) 't2<t1>' resolving forward declaration...13# CHECK: (t2<t1>) {}14# CHECK: (lldb) p v215# CHECK: DWARFASTParserClang::ParseTypeFromDWARF{{.*}}DW_TAG_structure_type (DW_TAG_structure_type) name = 't1'16# CHECK: DW_TAG_structure_type (DW_TAG_structure_type) 't1' resolving forward declaration...17 18#--- lldb.cmd19log enable dwarf comp20p v121p v222 23#--- main.cpp24template<typename T>25struct t2 {26};27struct t1;28t2<t1> v1; // this CU doesn't have definition DIE for t1, but only declaration DIE for it.29int main() {30}31 32#--- t1_def.cpp33struct t1 { // this CU contains definition DIE for t1.34 int x;35};36t1 v2;37