2012-12-06 07:38:10 +00:00
|
|
|
; RUN: llc -mtriple=x86_64-apple-darwin -O0 -filetype=obj -o %t < %s
|
2013-01-25 21:44:53 +00:00
|
|
|
; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
|
2012-12-06 07:38:10 +00:00
|
|
|
|
|
|
|
%class.A = type { [42 x i32] }
|
|
|
|
|
|
|
|
@a = global %class.A zeroinitializer, align 4
|
|
|
|
|
|
|
|
; Check that we can handle non-default array bounds. In this case, the array
|
|
|
|
; goes from [-3, 38].
|
|
|
|
|
2013-10-29 22:49:29 +00:00
|
|
|
; 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]*]]})
|
2013-01-04 21:51:53 +00:00
|
|
|
|
2013-10-29 22:49:29 +00:00
|
|
|
; CHECK: [[ARRAY]]: DW_TAG_array_type [{{.*}}] *
|
|
|
|
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BASE:0x[0-9a-f]*]]})
|
2013-01-04 21:51:53 +00:00
|
|
|
|
2013-10-29 05:49:41 +00:00
|
|
|
; CHECK: DW_TAG_subrange_type
|
2013-10-29 22:49:29 +00:00
|
|
|
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BASE2:0x[0-9a-f]*]]})
|
2013-08-19 03:36:23 +00:00
|
|
|
; CHECK-NEXT: DW_AT_lower_bound [DW_FORM_data8] (0xfffffffffffffffd)
|
|
|
|
; CHECK-NEXT: DW_AT_upper_bound [DW_FORM_data1] (0x26)
|
2013-01-04 21:51:53 +00:00
|
|
|
|
2013-10-29 22:49:29 +00:00
|
|
|
; 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)
|
2012-12-06 07:38:10 +00:00
|
|
|
|
|
|
|
!llvm.dbg.cu = !{!0}
|
2013-11-22 21:49:45 +00:00
|
|
|
!llvm.module.flags = !{!21}
|
2012-12-06 07:38:10 +00:00
|
|
|
|
2014-02-04 01:23:52 +00:00
|
|
|
!0 = metadata !{i32 786449, metadata !20, i32 4, metadata !"clang version 3.3 (trunk 169136)", i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !1, metadata !3, metadata !1, metadata !""} ; [ DW_TAG_compile_unit ] [/Volumes/Sandbox/llvm/t.cpp] [DW_LANG_C_plus_plus]
|
|
|
|
!1 = metadata !{}
|
2013-02-02 05:56:24 +00:00
|
|
|
!3 = metadata !{metadata !5}
|
2013-03-11 22:37:40 +00:00
|
|
|
!5 = metadata !{i32 786484, i32 0, null, metadata !"a", metadata !"a", metadata !"", metadata !6, i32 1, metadata !7, i32 0, i32 1, %class.A* @a, null} ; [ DW_TAG_variable ] [a] [line 1] [def]
|
2013-03-28 02:44:59 +00:00
|
|
|
!6 = metadata !{i32 786473, metadata !20} ; [ DW_TAG_file_type ]
|
2013-08-26 22:39:55 +00:00
|
|
|
!7 = metadata !{i32 786434, metadata !20, null, metadata !"A", i32 1, i64 0, i64 32, i32 0, i32 0, null, metadata !8, i32 0, null, null, null} ; [ DW_TAG_class_type ] [A] [line 1, size 0, align 32, offset 0] [def] [from ]
|
2012-12-06 07:38:10 +00:00
|
|
|
!8 = metadata !{metadata !9, metadata !14}
|
2013-03-28 02:44:59 +00:00
|
|
|
!9 = metadata !{i32 786445, metadata !20, metadata !7, metadata !"x", i32 1, i64 0, i64 0, i64 0, i32 1, metadata !10} ; [ DW_TAG_member ] [x] [line 1, size 0, align 0, offset 0] [private] [from ]
|
2013-09-06 21:03:58 +00:00
|
|
|
!10 = metadata !{i32 786433, null, null, metadata !"", i32 0, i64 0, i64 32, i32 0, i32 0, metadata !11, metadata !12, i32 0, null, null, null} ; [ DW_TAG_array_type ] [line 0, size 0, align 32, offset 0] [from int]
|
2013-03-28 02:44:59 +00:00
|
|
|
!11 = metadata !{i32 786468, null, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
|
2012-12-06 07:38:10 +00:00
|
|
|
!12 = metadata !{metadata !13}
|
|
|
|
!13 = metadata !{i32 786465, i64 -3, i64 42} ; [ DW_TAG_subrange_type ] [-3, 39]
|
2013-03-28 02:44:59 +00:00
|
|
|
!14 = metadata !{i32 786478, metadata !6, metadata !7, metadata !"A", metadata !"A", metadata !"", i32 1, metadata !15, i1 false, i1 false, i32 0, i32 0, null, i32 320, i1 false, null, null, i32 0, metadata !18, i32 1} ; [ DW_TAG_subprogram ] [line 1] [A]
|
2013-09-08 03:11:54 +00:00
|
|
|
!15 = metadata !{i32 786453, i32 0, null, i32 0, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !16, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
|
2012-12-06 07:38:10 +00:00
|
|
|
!16 = metadata !{null, metadata !17}
|
2013-09-08 03:11:54 +00:00
|
|
|
!17 = metadata !{i32 786447, i32 0, null, i32 0, i32 0, i64 64, i64 64, i64 0, i32 1088, metadata !7} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from A]
|
2012-12-06 07:38:10 +00:00
|
|
|
!18 = metadata !{metadata !19}
|
|
|
|
!19 = metadata !{i32 786468} ; [ DW_TAG_base_type ] [line 0, size 0, align 0, offset 0]
|
2013-03-17 21:13:55 +00:00
|
|
|
!20 = metadata !{metadata !"t.cpp", metadata !"/Volumes/Sandbox/llvm"}
|
2013-11-22 21:49:45 +00:00
|
|
|
!21 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}
|