[dsymutil] Implement DW_AT_ranges linking.
[oota-llvm.git] / test / tools / dsymutil / X86 / basic-lto-linking-x86.test
1 RUN: llvm-dsymutil -o - -oso-prepend-path=%p/.. %p/../Inputs/basic-lto.macho.x86_64 | llvm-dwarfdump - | FileCheck %s
2
3 CHECK: file format Mach-O 64-bit x86-64
4
5 CHECK: debug_info contents
6
7 CHECK:  Compile Unit:
8
9 CHECK:  DW_TAG_compile_unit [1] *
10 CHECK:    DW_AT_producer [DW_FORM_strp]     ( .debug_str[0x00000001] = "Apple LLVM version 6.0 (clang-600.0.39) (based on LLVM 3.5svn)")
11 CHECK:    DW_AT_language [DW_FORM_data2]        (DW_LANG_C99)
12 CHECK:    DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000040] = "basic1.c")
13 CHECK:    DW_AT_comp_dir [DW_FORM_strp]     ( .debug_str[0x00000049] = "/Inputs")
14 CHECK:    DW_AT_low_pc [DW_FORM_addr]       (0x0000000100000f40)
15 CHECK:    DW_TAG_subprogram [2] *
16 CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000051] = "main")
17 CHECK:      DW_AT_decl_line [DW_FORM_data1]     (23)
18 CHECK:      DW_AT_prototyped [DW_FORM_flag]     (0x01)
19 CHECK:      DW_AT_type [DW_FORM_ref4]       (cu + 0x0063 => {0x00000063})
20 CHECK:      DW_AT_external [DW_FORM_flag]       (0x01)
21 CHECK:      DW_AT_accessibility [DW_FORM_data1] (DW_ACCESS_public)
22 CHECK:      DW_AT_low_pc [DW_FORM_addr]     (0x0000000100000f40)
23 CHECK:      DW_AT_high_pc [DW_FORM_addr]     (0x0000000100000f4b)
24 CHECK:      DW_AT_frame_base [DW_FORM_block1]   (<0x01> 56 )
25 CHECK:      DW_TAG_formal_parameter [3]
26 CHECK:        DW_AT_name [DW_FORM_strp]     ( .debug_str[0x00000056] = "argc")
27 CHECK:        DW_AT_type [DW_FORM_ref4]     (cu + 0x0063 => {0x00000063})
28 CHECK:        DW_AT_location [DW_FORM_block1]   (<0x03> 55 93 04 )
29 CHECK:      DW_TAG_formal_parameter [3]
30 CHECK:        DW_AT_name [DW_FORM_strp]     ( .debug_str[0x0000005b] = "argv")
31 CHECK:        DW_AT_type [DW_FORM_ref4]     (cu + 0x006a => {0x0000006a})
32 CHECK:        DW_AT_location [DW_FORM_block1]   (<0x01> 54 )
33 CHECK:      NULL
34 CHECK:    DW_TAG_base_type [4]
35 CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000060] = "int")
36 CHECK:      DW_AT_encoding [DW_FORM_data1]      (DW_ATE_signed)
37 CHECK:      DW_AT_byte_size [DW_FORM_data1]     (0x04)
38 CHECK:    DW_TAG_pointer_type [5]
39 CHECK:      DW_AT_type [DW_FORM_ref4]       (cu + 0x006f => {0x0000006f})
40 CHECK:    DW_TAG_pointer_type [5]
41 CHECK:      DW_AT_type [DW_FORM_ref4]       (cu + 0x0074 => {0x00000074})
42 CHECK:    DW_TAG_const_type [6]
43 CHECK:      DW_AT_type [DW_FORM_ref4]       (cu + 0x0079 => {0x00000079})
44 CHECK:    DW_TAG_base_type [4]
45 CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000064] = "char")
46 CHECK:      DW_AT_encoding [DW_FORM_data1]      (DW_ATE_signed_char)
47 CHECK:      DW_AT_byte_size [DW_FORM_data1]     (0x01)
48 CHECK:    NULL
49
50 CHECK:  Compile Unit:
51
52 CHECK:  DW_TAG_compile_unit [1] *
53 CHECK:    DW_AT_producer [DW_FORM_strp]     ( .debug_str[0x00000001] = "Apple LLVM version 6.0 (clang-600.0.39) (based on LLVM 3.5svn)")
54 CHECK:    DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000069] = "basic2.c")
55 CHECK:    DW_AT_comp_dir [DW_FORM_strp]     ( .debug_str[0x00000049] = "/Inputs")
56 CHECK:   DW_AT_low_pc [DW_FORM_addr]       (0x0000000100000f50)
57 CHECK:    DW_TAG_variable [7]
58 CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000072] = "private_int")
59 CHECK:      DW_AT_type [DW_FORM_ref_addr]   (0x0000000000000063)
60 CHECK:      DW_AT_location [DW_FORM_block1] (<0x09> 03 08 10 00 00 01 00 00 00 )
61 CHECK:    DW_TAG_variable [7]
62 CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x0000007e] = "baz")
63 CHECK:      DW_AT_type [DW_FORM_ref_addr]   (0x0000000000000063)
64 CHECK:      DW_AT_location [DW_FORM_block1] (<0x09> 03 00 10 00 00 01 00 00 00 )
65 CHECK:    DW_TAG_subprogram [8] *
66 CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000082] = "foo")
67 CHECK:      DW_AT_type [DW_FORM_ref_addr]   (0x0000000000000063)
68 CHECK:      DW_AT_low_pc [DW_FORM_addr]     (0x0000000100000f50)
69 CHECK:      DW_AT_high_pc [DW_FORM_addr]    (0x0000000100000f89)
70 CHECK:      DW_AT_frame_base [DW_FORM_block1]   (<0x01> 56 )
71 CHECK:      DW_TAG_formal_parameter [9]
72 CHECK:        DW_AT_name [DW_FORM_strp]     ( .debug_str[0x00000086] = "arg")
73 CHECK:        DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063)
74 CHECK:      DW_TAG_inlined_subroutine [10]
75 CHECK:        DW_AT_abstract_origin [DW_FORM_ref4]  (cu + 0x00a7 => {0x00000128} "inc")
76 CHECK:        DW_AT_low_pc [DW_FORM_addr]   (0x0000000100000f63)
77 CHECK:        DW_AT_high_pc [DW_FORM_addr]  (0x0000000100000f72)
78 CHECK:        DW_AT_call_line [DW_FORM_data1]   (20)
79 CHECK:      NULL
80 CHECK:    DW_TAG_subprogram [11]
81 CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x0000008a] = "inc")
82 CHECK:      DW_AT_type [DW_FORM_ref_addr]   (0x0000000000000063)
83 CHECK:      DW_AT_inline [DW_FORM_data1]        (DW_INL_inlined)
84 CHECK:    NULL
85
86 CHECK:  Compile Unit:
87
88 CHECK:  DW_TAG_compile_unit [1] *
89 CHECK:    DW_AT_producer [DW_FORM_strp]     ( .debug_str[0x00000001] = "Apple LLVM version 6.0 (clang-600.0.39) (based on LLVM 3.5svn)")
90 CHECK:    DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000008e] = "basic3.c")
91 CHECK:    DW_AT_comp_dir [DW_FORM_strp]     ( .debug_str[0x00000049] = "/Inputs")
92 CHECK:    DW_AT_low_pc [DW_FORM_addr]       (0x0000000100000f90)
93 CHECK:    DW_TAG_variable [12]
94 CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000097] = "val")
95 CHECK:      DW_AT_type [DW_FORM_ref4]       (cu + 0x003c => {0x00000176})
96 CHECK:      DW_AT_location [DW_FORM_block1] (<0x09> 03 04 10 00 00 01 00 00 00 )
97 CHECK:    DW_TAG_volatile_type [13]
98 CHECK:      DW_AT_type [DW_FORM_ref_addr]   (0x0000000000000063)
99 CHECK:    DW_TAG_subprogram [8] *
100 CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x0000009b] = "bar")
101 CHECK:      DW_AT_type [DW_FORM_ref_addr]   (0x0000000000000063)
102 CHECK:      DW_AT_low_pc [DW_FORM_addr]     (0x0000000100000f90)
103 CHECK:      DW_AT_high_pc [DW_FORM_addr]    (0x0000000100000fb4)
104 CHECK:      DW_AT_frame_base [DW_FORM_block1]   (<0x01> 56 )
105 CHECK:      DW_TAG_formal_parameter [9]
106 CHECK:        DW_AT_name [DW_FORM_strp]     ( .debug_str[0x00000086] = "arg")
107 CHECK:        DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063)
108 CHECK:      DW_TAG_lexical_block [14] *
109 CHECK:        DW_AT_low_pc [DW_FORM_addr]   (0x0000000100000f94)
110 CHECK         DW_AT_high_pc [DW_FORM_addr]  (0x0000000100000fa7)
111 CHECK:        DW_TAG_inlined_subroutine [15]
112 CHECK:          DW_AT_abstract_origin [DW_FORM_ref4]        (cu + 0x009a => {0x000001d4} "inc")
113 CHECK:          DW_AT_ranges [DW_FORM_data4]        (0x00000000
114 CHECK:             [0x0000000100000f94 - 0x0000000100000f9a)
115 CHECK:             [0x0000000100000f9f - 0x0000000100000fa7))
116 CHECK:        NULL
117 CHECK:      NULL
118 CHECK:    DW_TAG_subprogram [11]
119 CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x0000008a] = "inc")
120 CHECK:      DW_AT_type [DW_FORM_ref_addr]   (0x0000000000000063)
121 CHECK:    NULL