From f4c339e04a33c85a40c8d0df692614f6d8f56a6a Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Tue, 29 Oct 2013 22:49:29 +0000 Subject: Debug Info: instead of calling addToContextOwner which constructs the context after the DIE creation, we construct the context first. Ensure that we create the context before we create a type so that we can add the newly created type to the parent. Remove last use of addToContextOwner now that it's not needed. We use createAndAddDIE to wrap around "new DIE(". Now all shareable DIEs should be added to their parents right after the creation. Reviewed off-list by Eric, Thanks. llvm-svn: 193657 --- .../DebugInfo/X86/nondefault-subrange-array.ll | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'llvm/test/DebugInfo/X86/nondefault-subrange-array.ll') diff --git a/llvm/test/DebugInfo/X86/nondefault-subrange-array.ll b/llvm/test/DebugInfo/X86/nondefault-subrange-array.ll index 12934ced47f..236a4c7ebca 100644 --- a/llvm/test/DebugInfo/X86/nondefault-subrange-array.ll +++ b/llvm/test/DebugInfo/X86/nondefault-subrange-array.ll @@ -8,23 +8,24 @@ ; Check that we can handle non-default array bounds. In this case, the array ; goes from [-3, 38]. -; CHECK: [[BASE:0x[0-9a-f]*]]: DW_TAG_base_type -; CHECK: [[BASE2:0x[0-9a-f]*]]: DW_TAG_base_type -; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "int") -; CHECK-NEXT: DW_AT_byte_size [DW_FORM_data1] (0x04) -; CHECK-NEXT: DW_AT_encoding [DW_FORM_data1] (0x05) +; CHECK: DW_TAG_class_type +; CHECK: DW_TAG_member +; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "x") +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[ARRAY:0x[0-9a-f]*]]}) -; CHECK: [[ARRAY:0x[0-9a-f]*]]: DW_TAG_array_type [{{.*}}] * -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BASE]]}) +; CHECK: [[ARRAY]]: DW_TAG_array_type [{{.*}}] * +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BASE:0x[0-9a-f]*]]}) ; CHECK: DW_TAG_subrange_type -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BASE2]]}) +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BASE2:0x[0-9a-f]*]]}) ; CHECK-NEXT: DW_AT_lower_bound [DW_FORM_data8] (0xfffffffffffffffd) ; CHECK-NEXT: DW_AT_upper_bound [DW_FORM_data1] (0x26) -; CHECK: DW_TAG_member -; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "x") -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[ARRAY]]}) +; CHECK: [[BASE]]: DW_TAG_base_type +; CHECK: [[BASE2]]: DW_TAG_base_type +; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "int") +; CHECK-NEXT: DW_AT_byte_size [DW_FORM_data1] (0x04) +; CHECK-NEXT: DW_AT_encoding [DW_FORM_data1] (0x05) !llvm.dbg.cu = !{!0} -- cgit v1.2.3