Jyotsna Verma | 9dea095 | 2013-04-10 19:53:26 +0000 | [diff] [blame] | 1 | ; REQUIRES: object-emission |
| 2 | |
Adrian Prantl | 16aa4cf | 2017-09-11 23:05:20 +0000 | [diff] [blame] | 3 | ; RUN: %llc_dwarf -O0 -filetype=obj -dwarf-linkage-names=All < %s | llvm-dwarfdump -v - | FileCheck %s |
David Blaikie | 2881da7 | 2013-03-20 19:39:15 +0000 | [diff] [blame] | 4 | ; CHECK: debug_info contents |
Adrian Prantl | fed4f39 | 2017-04-28 22:25:46 +0000 | [diff] [blame] | 5 | ; CHECK: DW_AT_name{{.*}}= [[F1:.*]]) |
David Blaikie | 684fc53 | 2013-05-06 23:33:07 +0000 | [diff] [blame] | 6 | ; CHECK: [[NS1:0x[0-9a-f]*]]:{{ *}}DW_TAG_namespace |
Adrian Prantl | fed4f39 | 2017-04-28 22:25:46 +0000 | [diff] [blame] | 7 | ; CHECK-NOT: DW_AT_decl_file |
| 8 | ; CHECK-NOT: DW_AT_decl_line |
David Blaikie | fdabd48 | 2013-03-20 05:15:37 +0000 | [diff] [blame] | 9 | ; CHECK-NOT: NULL |
David Blaikie | f55abea | 2013-04-22 06:12:31 +0000 | [diff] [blame] | 10 | ; CHECK: [[NS2:0x[0-9a-f]*]]:{{ *}}DW_TAG_namespace |
David Blaikie | a354eed | 2013-03-20 19:14:16 +0000 | [diff] [blame] | 11 | ; CHECK-NEXT: DW_AT_name{{.*}} = "B" |
Adrian Prantl | fed4f39 | 2017-04-28 22:25:46 +0000 | [diff] [blame] | 12 | ; CHECK-NOT: DW_AT_decl_file |
| 13 | ; CHECK-NOT: DW_AT_decl_line |
David Blaikie | a354eed | 2013-03-20 19:14:16 +0000 | [diff] [blame] | 14 | ; CHECK-NOT: NULL |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 15 | ; CHECK: [[I:0x[0-9a-f]*]]:{{ *}}DW_TAG_variable |
David Blaikie | fdabd48 | 2013-03-20 05:15:37 +0000 | [diff] [blame] | 16 | ; CHECK-NEXT: DW_AT_name{{.*}}= "i" |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 17 | ; CHECK: [[VAR_FWD:0x[0-9a-f]*]]:{{ *}}DW_TAG_variable |
| 18 | ; CHECK-NEXT: DW_AT_name{{.*}}= "var_fwd" |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 19 | ; CHECK-NOT: NULL |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 20 | ; CHECK: [[FOO:0x[0-9a-f]*]]:{{ *}}DW_TAG_structure_type |
| 21 | ; CHECK-NEXT: DW_AT_name{{.*}}= "foo" |
| 22 | ; CHECK-NEXT: DW_AT_declaration |
| 23 | ; CHECK-NOT: NULL |
| 24 | ; CHECK: [[BAR:0x[0-9a-f]*]]:{{ *}}DW_TAG_structure_type |
| 25 | ; CHECK-NEXT: DW_AT_name{{.*}}= "bar" |
David Blaikie | 2195e13 | 2017-07-27 00:06:53 +0000 | [diff] [blame] | 26 | ; CHECK: DW_TAG_subprogram |
| 27 | ; CHECK-NOT: DW_TAG |
| 28 | ; CHECK: DW_AT_MIPS_linkage_name |
| 29 | ; CHECK-NOT: DW_TAG |
| 30 | ; CHECK: DW_AT_name{{.*}}= "f1" |
David Blaikie | 3c2fff3 | 2014-05-27 18:37:48 +0000 | [diff] [blame] | 31 | ; CHECK: [[FUNC1:.*]]: DW_TAG_subprogram |
| 32 | ; CHECK-NOT: DW_TAG |
| 33 | ; CHECK: DW_AT_MIPS_linkage_name |
| 34 | ; CHECK-NOT: DW_TAG |
| 35 | ; CHECK: DW_AT_name{{.*}}= "f1" |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 36 | ; CHECK: [[BAZ:0x[0-9a-f]*]]:{{.*}}DW_TAG_typedef |
| 37 | ; CHECK-NOT: DW_TAG |
| 38 | ; CHECK: DW_AT_name{{.*}}= "baz" |
| 39 | ; CHECK: [[VAR_DECL:0x[0-9a-f]*]]:{{.*}}DW_TAG_variable |
| 40 | ; CHECK-NOT: DW_TAG |
| 41 | ; CHECK: DW_AT_name{{.*}}= "var_decl" |
| 42 | ; CHECK-NOT: DW_TAG |
| 43 | ; CHECK: DW_AT_declaration |
| 44 | ; CHECK: [[FUNC_DECL:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram |
| 45 | ; CHECK-NOT: DW_TAG |
| 46 | ; CHECK: DW_AT_name{{.*}}= "func_decl" |
| 47 | ; CHECK-NOT: DW_TAG |
| 48 | ; CHECK: DW_AT_declaration |
| 49 | ; CHECK: [[FUNC_FWD:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram |
| 50 | ; CHECK-NOT: DW_TAG |
| 51 | ; CHECK: DW_AT_name{{.*}}= "func_fwd" |
| 52 | ; CHECK-NOT: DW_AT_declaration |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 53 | ; CHECK: NULL |
| 54 | |
| 55 | ; CHECK-NOT: NULL |
David Blaikie | 684fc53 | 2013-05-06 23:33:07 +0000 | [diff] [blame] | 56 | ; CHECK: DW_TAG_imported_module |
Adrian Prantl | d63bfd2 | 2017-07-19 00:09:54 +0000 | [diff] [blame] | 57 | ; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2:.*]]) |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 58 | ; CHECK-NEXT: DW_AT_decl_line{{.*}}(15) |
David Blaikie | 684fc53 | 2013-05-06 23:33:07 +0000 | [diff] [blame] | 59 | ; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS2]]}) |
David Blaikie | 6baa776 | 2013-05-07 17:57:13 +0000 | [diff] [blame] | 60 | ; CHECK: NULL |
| 61 | ; CHECK-NOT: NULL |
David Blaikie | 684fc53 | 2013-05-06 23:33:07 +0000 | [diff] [blame] | 62 | |
David Blaikie | 3c2fff3 | 2014-05-27 18:37:48 +0000 | [diff] [blame] | 63 | ; CHECK: DW_TAG_imported_module |
Adrian Prantl | d63bfd2 | 2017-07-19 00:09:54 +0000 | [diff] [blame] | 64 | ; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2:.*]]) |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 65 | ; CHECK-NEXT: DW_AT_decl_line{{.*}}(18) |
David Blaikie | 3c2fff3 | 2014-05-27 18:37:48 +0000 | [diff] [blame] | 66 | ; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS1]]}) |
| 67 | ; CHECK-NOT: NULL |
| 68 | |
David Blaikie | f55abea | 2013-04-22 06:12:31 +0000 | [diff] [blame] | 69 | ; CHECK: DW_TAG_subprogram |
David Blaikie | 2195e13 | 2017-07-27 00:06:53 +0000 | [diff] [blame] | 70 | ; CHECK-NOT: {{DW_TAG|NULL}} |
| 71 | ; CHECK: DW_TAG_subprogram |
David Blaikie | 2f75351 | 2014-05-23 21:11:46 +0000 | [diff] [blame] | 72 | ; CHECK-NOT: DW_TAG |
| 73 | ; CHECK: DW_AT_MIPS_linkage_name |
| 74 | ; CHECK-NOT: DW_TAG |
| 75 | ; CHECK: DW_AT_name{{.*}}= "func" |
David Blaikie | f55abea | 2013-04-22 06:12:31 +0000 | [diff] [blame] | 76 | ; CHECK-NOT: NULL |
| 77 | ; CHECK: DW_TAG_imported_module |
Adrian Prantl | fed4f39 | 2017-04-28 22:25:46 +0000 | [diff] [blame] | 78 | ; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2:.*]]) |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 79 | ; CHECK-NEXT: DW_AT_decl_line{{.*}}(26) |
David Blaikie | 684fc53 | 2013-05-06 23:33:07 +0000 | [diff] [blame] | 80 | ; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS1]]}) |
| 81 | ; CHECK-NOT: NULL |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 82 | ; CHECK: DW_TAG_imported_declaration |
Frederic Riss | 955724e | 2014-09-22 12:36:04 +0000 | [diff] [blame] | 83 | ; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]]) |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 84 | ; CHECK-NEXT: DW_AT_decl_line{{.*}}(27) |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 85 | ; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FOO]]}) |
| 86 | ; CHECK-NOT: NULL |
| 87 | ; CHECK: DW_TAG_imported_declaration |
Frederic Riss | 955724e | 2014-09-22 12:36:04 +0000 | [diff] [blame] | 88 | ; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]]) |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 89 | ; CHECK-NEXT: DW_AT_decl_line{{.*}}(28) |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 90 | ; CHECK-NEXT: DW_AT_import{{.*}}=> {[[BAR]]}) |
| 91 | ; CHECK-NOT: NULL |
| 92 | ; CHECK: DW_TAG_imported_declaration |
Frederic Riss | 955724e | 2014-09-22 12:36:04 +0000 | [diff] [blame] | 93 | ; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]]) |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 94 | ; CHECK-NEXT: DW_AT_decl_line{{.*}}(29) |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 95 | ; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FUNC1]]}) |
| 96 | ; CHECK-NOT: NULL |
| 97 | ; CHECK: DW_TAG_imported_declaration |
Frederic Riss | 955724e | 2014-09-22 12:36:04 +0000 | [diff] [blame] | 98 | ; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]]) |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 99 | ; CHECK-NEXT: DW_AT_decl_line{{.*}}(30) |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 100 | ; CHECK-NEXT: DW_AT_import{{.*}}=> {[[I]]}) |
| 101 | ; CHECK-NOT: NULL |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 102 | ; CHECK: DW_TAG_imported_declaration |
| 103 | ; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]]) |
| 104 | ; CHECK-NEXT: DW_AT_decl_line{{.*}}(31) |
| 105 | ; CHECK-NEXT: DW_AT_import{{.*}}=> {[[BAZ]]}) |
| 106 | ; CHECK-NOT: NULL |
David Blaikie | 2a40c14 | 2014-04-06 06:29:01 +0000 | [diff] [blame] | 107 | ; CHECK: [[X:0x[0-9a-f]*]]:{{ *}}DW_TAG_imported_declaration |
Frederic Riss | 955724e | 2014-09-22 12:36:04 +0000 | [diff] [blame] | 108 | ; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]]) |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 109 | ; CHECK-NEXT: DW_AT_decl_line{{.*}}(32) |
David Blaikie | e63d5d1 | 2013-05-20 22:50:35 +0000 | [diff] [blame] | 110 | ; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS1]]}) |
| 111 | ; CHECK-NEXT: DW_AT_name{{.*}}"X" |
| 112 | ; CHECK-NOT: NULL |
David Blaikie | 2a40c14 | 2014-04-06 06:29:01 +0000 | [diff] [blame] | 113 | ; CHECK: DW_TAG_imported_declaration |
Frederic Riss | 955724e | 2014-09-22 12:36:04 +0000 | [diff] [blame] | 114 | ; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]]) |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 115 | ; CHECK-NEXT: DW_AT_decl_line{{.*}}(33) |
David Blaikie | e63d5d1 | 2013-05-20 22:50:35 +0000 | [diff] [blame] | 116 | ; CHECK-NEXT: DW_AT_import{{.*}}=> {[[X]]}) |
| 117 | ; CHECK-NEXT: DW_AT_name{{.*}}"Y" |
| 118 | ; CHECK-NOT: NULL |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 119 | ; CHECK: DW_TAG_imported_declaration |
| 120 | ; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]]) |
| 121 | ; CHECK-NEXT: DW_AT_decl_line{{.*}}(34) |
| 122 | ; CHECK-NEXT: DW_AT_import{{.*}}=> {[[VAR_DECL]]}) |
| 123 | ; CHECK: DW_TAG_imported_declaration |
| 124 | ; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]]) |
| 125 | ; CHECK-NEXT: DW_AT_decl_line{{.*}}(35) |
| 126 | ; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FUNC_DECL]]}) |
| 127 | ; CHECK: DW_TAG_imported_declaration |
| 128 | ; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]]) |
| 129 | ; CHECK-NEXT: DW_AT_decl_line{{.*}}(36) |
| 130 | ; CHECK-NEXT: DW_AT_import{{.*}}=> {[[VAR_FWD]]}) |
| 131 | ; CHECK: DW_TAG_imported_declaration |
| 132 | ; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]]) |
| 133 | ; CHECK-NEXT: DW_AT_decl_line{{.*}}(37) |
| 134 | ; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FUNC_FWD]]}) |
| 135 | |
Amjad Aboud | 72da939 | 2016-04-30 01:44:07 +0000 | [diff] [blame] | 136 | ; CHECK: DW_TAG_lexical_block |
| 137 | ; CHECK-NOT: NULL |
| 138 | ; CHECK: DW_TAG_imported_module |
| 139 | ; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]]) |
| 140 | ; CHECK-NEXT: DW_AT_decl_line{{.*}}(23) |
| 141 | ; CHECK-NEXT: DW_AT_import{{.*}}=> |
| 142 | ; CHECK: NULL |
David Blaikie | 6baa776 | 2013-05-07 17:57:13 +0000 | [diff] [blame] | 143 | ; CHECK: NULL |
David Blaikie | 3c2fff3 | 2014-05-27 18:37:48 +0000 | [diff] [blame] | 144 | ; CHECK: NULL |
David Blaikie | 684fc53 | 2013-05-06 23:33:07 +0000 | [diff] [blame] | 145 | |
David Blaikie | fdabd48 | 2013-03-20 05:15:37 +0000 | [diff] [blame] | 146 | ; IR generated from clang/test/CodeGenCXX/debug-info-namespace.cpp, file paths |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 147 | ; changed to protect the guilty. The C++ source code is: |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 148 | ; // RUN... |
| 149 | ; // RUN... |
| 150 | ; // RUN... |
| 151 | ; |
David Blaikie | fdabd48 | 2013-03-20 05:15:37 +0000 | [diff] [blame] | 152 | ; namespace A { |
David Blaikie | a354eed | 2013-03-20 19:14:16 +0000 | [diff] [blame] | 153 | ; #line 1 "foo.cpp" |
| 154 | ; namespace B { |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 155 | ; extern int i; |
| 156 | ; int f1() { return 0; } |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 157 | ; void f1(int) { } |
| 158 | ; struct foo; |
| 159 | ; struct bar { }; |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 160 | ; typedef bar baz; |
| 161 | ; extern int var_decl; |
| 162 | ; void func_decl(void); |
| 163 | ; extern int var_fwd; |
| 164 | ; void func_fwd(void); |
David Blaikie | fdabd48 | 2013-03-20 05:15:37 +0000 | [diff] [blame] | 165 | ; } |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 166 | ; } |
| 167 | ; namespace A { |
David Blaikie | 684fc53 | 2013-05-06 23:33:07 +0000 | [diff] [blame] | 168 | ; using namespace B; |
David Blaikie | a354eed | 2013-03-20 19:14:16 +0000 | [diff] [blame] | 169 | ; } |
David Blaikie | f55abea | 2013-04-22 06:12:31 +0000 | [diff] [blame] | 170 | ; |
David Blaikie | 684fc53 | 2013-05-06 23:33:07 +0000 | [diff] [blame] | 171 | ; using namespace A; |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 172 | ; namespace E = A; |
| 173 | ; int B::i = f1(); |
David Blaikie | 684fc53 | 2013-05-06 23:33:07 +0000 | [diff] [blame] | 174 | ; int func(bool b) { |
| 175 | ; if (b) { |
| 176 | ; using namespace A::B; |
| 177 | ; return i; |
| 178 | ; } |
| 179 | ; using namespace A; |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 180 | ; using B::foo; |
| 181 | ; using B::bar; |
| 182 | ; using B::f1; |
| 183 | ; using B::i; |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 184 | ; using B::baz; |
David Blaikie | e63d5d1 | 2013-05-20 22:50:35 +0000 | [diff] [blame] | 185 | ; namespace X = A; |
| 186 | ; namespace Y = X; |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 187 | ; using B::var_decl; |
| 188 | ; using B::func_decl; |
| 189 | ; using B::var_fwd; |
| 190 | ; using B::func_fwd; |
David Blaikie | e63d5d1 | 2013-05-20 22:50:35 +0000 | [diff] [blame] | 191 | ; return i + X::B::i + Y::B::i; |
David Blaikie | f55abea | 2013-04-22 06:12:31 +0000 | [diff] [blame] | 192 | ; } |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 193 | ; |
| 194 | ; namespace A { |
| 195 | ; using B::i; |
| 196 | ; namespace B { |
| 197 | ; int var_fwd = i; |
| 198 | ; } |
| 199 | ; } |
| 200 | ; void B::func_fwd() {} |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 201 | |
Adrian Prantl | bceaaa9 | 2016-12-20 02:09:43 +0000 | [diff] [blame] | 202 | @_ZN1A1B1iE = global i32 0, align 4, !dbg !131 |
| 203 | @_ZN1A1B7var_fwdE = global i32 0, align 4, !dbg !132 |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 204 | @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_debug_info_namespace.cpp, i8* null }] |
David Blaikie | fdabd48 | 2013-03-20 05:15:37 +0000 | [diff] [blame] | 205 | |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 206 | ; Function Attrs: nounwind ssp uwtable |
Peter Collingbourne | d4bff30 | 2015-11-05 22:03:56 +0000 | [diff] [blame] | 207 | define i32 @_ZN1A1B2f1Ev() #0 !dbg !10 { |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 208 | entry: |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 209 | ret i32 0, !dbg !60 |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 210 | } |
| 211 | |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 212 | ; Function Attrs: nounwind ssp uwtable |
Peter Collingbourne | d4bff30 | 2015-11-05 22:03:56 +0000 | [diff] [blame] | 213 | define void @_ZN1A1B2f1Ei(i32) #0 !dbg !14 { |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 214 | entry: |
| 215 | %.addr = alloca i32, align 4 |
| 216 | store i32 %0, i32* %.addr, align 4 |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 217 | call void @llvm.dbg.declare(metadata i32* %.addr, metadata !61, metadata !62), !dbg !63 |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 218 | ret void, !dbg !64 |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 219 | } |
| 220 | |
| 221 | ; Function Attrs: nounwind readnone |
Adrian Prantl | 87b7eb9 | 2014-10-01 18:55:02 +0000 | [diff] [blame] | 222 | declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 |
David Blaikie | 3b6038b | 2013-05-08 06:01:41 +0000 | [diff] [blame] | 223 | |
Peter Collingbourne | d4bff30 | 2015-11-05 22:03:56 +0000 | [diff] [blame] | 224 | define internal void @__cxx_global_var_init() section "__TEXT,__StaticInit,regular,pure_instructions" !dbg !17 { |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 225 | entry: |
| 226 | %call = call i32 @_ZN1A1B2f1Ev(), !dbg !65 |
| 227 | store i32 %call, i32* @_ZN1A1B1iE, align 4, !dbg !65 |
| 228 | ret void, !dbg !65 |
| 229 | } |
| 230 | |
| 231 | ; Function Attrs: nounwind ssp uwtable |
Peter Collingbourne | d4bff30 | 2015-11-05 22:03:56 +0000 | [diff] [blame] | 232 | define i32 @_Z4funcb(i1 zeroext %b) #0 !dbg !21 { |
David Blaikie | f55abea | 2013-04-22 06:12:31 +0000 | [diff] [blame] | 233 | entry: |
David Blaikie | 684fc53 | 2013-05-06 23:33:07 +0000 | [diff] [blame] | 234 | %retval = alloca i32, align 4 |
| 235 | %b.addr = alloca i8, align 1 |
| 236 | %frombool = zext i1 %b to i8 |
| 237 | store i8 %frombool, i8* %b.addr, align 1 |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 238 | call void @llvm.dbg.declare(metadata i8* %b.addr, metadata !66, metadata !62), !dbg !67 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 239 | %0 = load i8, i8* %b.addr, align 1, !dbg !68 |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 240 | %tobool = trunc i8 %0 to i1, !dbg !68 |
| 241 | br i1 %tobool, label %if.then, label %if.end, !dbg !68 |
David Blaikie | 684fc53 | 2013-05-06 23:33:07 +0000 | [diff] [blame] | 242 | |
| 243 | if.then: ; preds = %entry |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 244 | %1 = load i32, i32* @_ZN1A1B1iE, align 4, !dbg !69 |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 245 | store i32 %1, i32* %retval, !dbg !69 |
| 246 | br label %return, !dbg !69 |
David Blaikie | 684fc53 | 2013-05-06 23:33:07 +0000 | [diff] [blame] | 247 | |
| 248 | if.end: ; preds = %entry |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 249 | %2 = load i32, i32* @_ZN1A1B1iE, align 4, !dbg !70 |
| 250 | %3 = load i32, i32* @_ZN1A1B1iE, align 4, !dbg !70 |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 251 | %add = add nsw i32 %2, %3, !dbg !70 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 252 | %4 = load i32, i32* @_ZN1A1B1iE, align 4, !dbg !70 |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 253 | %add1 = add nsw i32 %add, %4, !dbg !70 |
| 254 | store i32 %add1, i32* %retval, !dbg !70 |
| 255 | br label %return, !dbg !70 |
David Blaikie | 684fc53 | 2013-05-06 23:33:07 +0000 | [diff] [blame] | 256 | |
| 257 | return: ; preds = %if.end, %if.then |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 258 | %5 = load i32, i32* %retval, !dbg !71 |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 259 | ret i32 %5, !dbg !71 |
David Blaikie | f55abea | 2013-04-22 06:12:31 +0000 | [diff] [blame] | 260 | } |
| 261 | |
Peter Collingbourne | d4bff30 | 2015-11-05 22:03:56 +0000 | [diff] [blame] | 262 | define internal void @__cxx_global_var_init1() section "__TEXT,__StaticInit,regular,pure_instructions" !dbg !25 { |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 263 | entry: |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 264 | %0 = load i32, i32* @_ZN1A1B1iE, align 4, !dbg !72 |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 265 | store i32 %0, i32* @_ZN1A1B7var_fwdE, align 4, !dbg !72 |
| 266 | ret void, !dbg !72 |
| 267 | } |
| 268 | |
| 269 | ; Function Attrs: nounwind ssp uwtable |
Peter Collingbourne | d4bff30 | 2015-11-05 22:03:56 +0000 | [diff] [blame] | 270 | define void @_ZN1A1B8func_fwdEv() #0 !dbg !26 { |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 271 | entry: |
| 272 | ret void, !dbg !73 |
| 273 | } |
| 274 | |
| 275 | define internal void @_GLOBAL__sub_I_debug_info_namespace.cpp() section "__TEXT,__StaticInit,regular,pure_instructions" { |
| 276 | entry: |
| 277 | call void @__cxx_global_var_init(), !dbg !74 |
| 278 | call void @__cxx_global_var_init1(), !dbg !74 |
| 279 | ret void, !dbg !74 |
| 280 | } |
| 281 | |
Fangrui Song | 502a77f | 2019-12-24 15:52:21 -0800 | [diff] [blame] | 282 | attributes #0 = { nounwind ssp uwtable "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } |
David Blaikie | 684fc53 | 2013-05-06 23:33:07 +0000 | [diff] [blame] | 283 | attributes #1 = { nounwind readnone } |
David Blaikie | f55abea | 2013-04-22 06:12:31 +0000 | [diff] [blame] | 284 | |
David Blaikie | fdabd48 | 2013-03-20 05:15:37 +0000 | [diff] [blame] | 285 | !llvm.dbg.cu = !{!0} |
Frederic Riss | fdccfc1 | 2014-11-18 02:46:11 +0000 | [diff] [blame] | 286 | !llvm.module.flags = !{!57, !58} |
| 287 | !llvm.ident = !{!59} |
David Blaikie | fdabd48 | 2013-03-20 05:15:37 +0000 | [diff] [blame] | 288 | |
Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 289 | !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !30, imports: !33) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 290 | !1 = !DIFile(filename: "debug-info-namespace.cpp", directory: "/tmp") |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 291 | !2 = !{} |
| 292 | !3 = !{!4, !8} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 293 | !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 5, flags: DIFlagFwdDecl, file: !5, scope: !6, identifier: "_ZTSN1A1B3fooE") |
| 294 | !5 = !DIFile(filename: "foo.cpp", directory: "/tmp") |
Adrian Prantl | fed4f39 | 2017-04-28 22:25:46 +0000 | [diff] [blame] | 295 | !6 = !DINamespace(name: "B", scope: !7) |
| 296 | !7 = !DINamespace(name: "A", scope: null) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 297 | !8 = !DICompositeType(tag: DW_TAG_structure_type, name: "bar", line: 6, size: 8, align: 8, file: !5, scope: !6, elements: !2, identifier: "_ZTSN1A1B3barE") |
Shiva Chen | 2c86455 | 2018-05-09 02:40:45 +0000 | [diff] [blame] | 298 | !10 = distinct !DISubprogram(name: "f1", linkageName: "_ZN1A1B2f1Ev", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !5, scope: !6, type: !11, retainedNodes: !2) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 299 | !11 = !DISubroutineType(types: !12) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 300 | !12 = !{!13} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 301 | !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |
Shiva Chen | 2c86455 | 2018-05-09 02:40:45 +0000 | [diff] [blame] | 302 | !14 = distinct !DISubprogram(name: "f1", linkageName: "_ZN1A1B2f1Ei", line: 4, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !5, scope: !6, type: !15, retainedNodes: !2) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 303 | !15 = !DISubroutineType(types: !16) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 304 | !16 = !{null, !13} |
Shiva Chen | 2c86455 | 2018-05-09 02:40:45 +0000 | [diff] [blame] | 305 | !17 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 20, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 20, file: !5, scope: !18, type: !19, retainedNodes: !2) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 306 | !18 = !DIFile(filename: "foo.cpp", directory: "/tmp") |
| 307 | !19 = !DISubroutineType(types: !20) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 308 | !20 = !{null} |
Shiva Chen | 2c86455 | 2018-05-09 02:40:45 +0000 | [diff] [blame] | 309 | !21 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcb", line: 21, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 21, file: !5, scope: !18, type: !22, retainedNodes: !2) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 310 | !22 = !DISubroutineType(types: !23) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 311 | !23 = !{!13, !24} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 312 | !24 = !DIBasicType(tag: DW_TAG_base_type, name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean) |
Shiva Chen | 2c86455 | 2018-05-09 02:40:45 +0000 | [diff] [blame] | 313 | !25 = distinct !DISubprogram(name: "__cxx_global_var_init1", line: 44, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 44, file: !5, scope: !18, type: !19, retainedNodes: !2) |
| 314 | !26 = distinct !DISubprogram(name: "func_fwd", linkageName: "_ZN1A1B8func_fwdEv", line: 47, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 47, file: !5, scope: !6, type: !19, retainedNodes: !2) |
| 315 | !27 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__sub_I_debug_info_namespace.cpp", isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: false, unit: !0, file: !1, scope: !28, type: !29, retainedNodes: !2) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 316 | !28 = !DIFile(filename: "debug-info-namespace.cpp", directory: "/tmp") |
| 317 | !29 = !DISubroutineType(types: !2) |
Adrian Prantl | bceaaa9 | 2016-12-20 02:09:43 +0000 | [diff] [blame] | 318 | !30 = !{!131, !132} |
Peter Collingbourne | d4135bb | 2016-09-13 01:12:59 +0000 | [diff] [blame] | 319 | !31 = !DIGlobalVariable(name: "i", linkageName: "_ZN1A1B1iE", line: 20, isLocal: false, isDefinition: true, scope: !6, file: !18, type: !13) |
| 320 | !32 = !DIGlobalVariable(name: "var_fwd", linkageName: "_ZN1A1B7var_fwdE", line: 44, isLocal: false, isDefinition: true, scope: !6, file: !18, type: !13) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 321 | !33 = !{!34, !35, !36, !37, !40, !41, !42, !43, !44, !45, !47, !48, !49, !51, !54, !55, !56} |
Adrian Prantl | d63bfd2 | 2017-07-19 00:09:54 +0000 | [diff] [blame] | 322 | !34 = !DIImportedEntity(tag: DW_TAG_imported_module, file: !5, line: 15, scope: !7, entity: !6) |
| 323 | !35 = !DIImportedEntity(tag: DW_TAG_imported_module, file: !5, line: 18, scope: !0, entity: !7) |
| 324 | !36 = !DIImportedEntity(tag: DW_TAG_imported_declaration, file: !5, line: 19, name: "E", scope: !0, entity: !7) |
| 325 | !37 = !DIImportedEntity(tag: DW_TAG_imported_module, file: !5, line: 23, scope: !38, entity: !6) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 326 | !38 = distinct !DILexicalBlock(line: 22, column: 10, file: !5, scope: !39) |
| 327 | !39 = distinct !DILexicalBlock(line: 22, column: 7, file: !5, scope: !21) |
Adrian Prantl | d63bfd2 | 2017-07-19 00:09:54 +0000 | [diff] [blame] | 328 | !40 = !DIImportedEntity(tag: DW_TAG_imported_module, file: !5, line: 26, scope: !21, entity: !7) |
| 329 | !41 = !DIImportedEntity(tag: DW_TAG_imported_declaration, file: !5, line: 27, scope: !21, entity: !4) |
| 330 | !42 = !DIImportedEntity(tag: DW_TAG_imported_declaration, file: !5, line: 28, scope: !21, entity: !8) |
| 331 | !43 = !DIImportedEntity(tag: DW_TAG_imported_declaration, file: !5, line: 29, scope: !21, entity: !14) |
| 332 | !44 = !DIImportedEntity(tag: DW_TAG_imported_declaration, file: !5, line: 30, scope: !21, entity: !31) |
| 333 | !45 = !DIImportedEntity(tag: DW_TAG_imported_declaration, file: !5, line: 31, scope: !21, entity: !46) |
Duncan P. N. Exon Smith | a59d3e5 | 2016-04-23 21:08:00 +0000 | [diff] [blame] | 334 | !46 = !DIDerivedType(tag: DW_TAG_typedef, name: "baz", line: 7, file: !5, scope: !6, baseType: !8) |
Adrian Prantl | d63bfd2 | 2017-07-19 00:09:54 +0000 | [diff] [blame] | 335 | !47 = !DIImportedEntity(tag: DW_TAG_imported_declaration, file: !5, line: 32, name: "X", scope: !21, entity: !7) |
| 336 | !48 = !DIImportedEntity(tag: DW_TAG_imported_declaration, file: !5, line: 33, name: "Y", scope: !21, entity: !47) |
| 337 | !49 = !DIImportedEntity(tag: DW_TAG_imported_declaration, file: !5, line: 34, scope: !21, entity: !50) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 338 | !50 = !DIGlobalVariable(name: "var_decl", linkageName: "_ZN1A1B8var_declE", line: 8, isLocal: false, isDefinition: false, scope: !6, file: !18, type: !13) |
Adrian Prantl | d63bfd2 | 2017-07-19 00:09:54 +0000 | [diff] [blame] | 339 | !51 = !DIImportedEntity(tag: DW_TAG_imported_declaration, file: !5, line: 35, scope: !21, entity: !52) |
Shiva Chen | 2c86455 | 2018-05-09 02:40:45 +0000 | [diff] [blame] | 340 | !52 = !DISubprogram(name: "func_decl", linkageName: "_ZN1A1B9func_declEv", line: 9, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false, file: !5, scope: !6, type: !19, retainedNodes: !53) |
Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 341 | !53 = !{} ; previously: invalid DW_TAG_base_type |
Adrian Prantl | d63bfd2 | 2017-07-19 00:09:54 +0000 | [diff] [blame] | 342 | !54 = !DIImportedEntity(tag: DW_TAG_imported_declaration, file: !5, line: 36, scope: !21, entity: !32) |
| 343 | !55 = !DIImportedEntity(tag: DW_TAG_imported_declaration, file: !5, line: 37, scope: !21, entity: !26) |
| 344 | !56 = !DIImportedEntity(tag: DW_TAG_imported_declaration, file: !5, line: 42, scope: !7, entity: !31) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 345 | !57 = !{i32 2, !"Dwarf Version", i32 2} |
Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 346 | !58 = !{i32 2, !"Debug Info Version", i32 3} |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 347 | !59 = !{!"clang version 3.6.0 "} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 348 | !60 = !DILocation(line: 3, column: 12, scope: !10) |
Duncan P. N. Exon Smith | ed013cd | 2015-07-31 18:58:39 +0000 | [diff] [blame] | 349 | !61 = !DILocalVariable(name: "", line: 4, arg: 1, scope: !14, file: !18, type: !13) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 350 | !62 = !DIExpression() |
| 351 | !63 = !DILocation(line: 4, column: 12, scope: !14) |
| 352 | !64 = !DILocation(line: 4, column: 16, scope: !14) |
| 353 | !65 = !DILocation(line: 20, column: 12, scope: !17) |
Duncan P. N. Exon Smith | ed013cd | 2015-07-31 18:58:39 +0000 | [diff] [blame] | 354 | !66 = !DILocalVariable(name: "b", line: 21, arg: 1, scope: !21, file: !18, type: !24) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 355 | !67 = !DILocation(line: 21, column: 15, scope: !21) |
| 356 | !68 = !DILocation(line: 22, column: 7, scope: !21) |
| 357 | !69 = !DILocation(line: 24, column: 5, scope: !38) |
| 358 | !70 = !DILocation(line: 38, column: 3, scope: !21) |
| 359 | !71 = !DILocation(line: 39, column: 1, scope: !21) |
| 360 | !72 = !DILocation(line: 44, column: 15, scope: !25) |
| 361 | !73 = !DILocation(line: 47, column: 21, scope: !26) |
| 362 | !74 = !DILocation(line: 0, scope: !75) |
| 363 | !75 = !DILexicalBlockFile(discriminator: 0, file: !5, scope: !27) |
Adrian Prantl | 0578221 | 2017-08-30 18:06:51 +0000 | [diff] [blame] | 364 | !131 = !DIGlobalVariableExpression(var: !31, expr: !DIExpression()) |
| 365 | !132 = !DIGlobalVariableExpression(var: !32, expr: !DIExpression()) |