blob: e176975855177273018dbb17a94353f2290eaca4 [file] [log] [blame]
Jyotsna Verma9dea0952013-04-10 19:53:26 +00001; REQUIRES: object-emission
2
Paul Robinson78046b42015-08-11 21:36:45 +00003; RUN: %llc_dwarf -O0 -filetype=obj -dwarf-linkage-names=Enable < %s | llvm-dwarfdump - | FileCheck %s
David Blaikie2881da72013-03-20 19:39:15 +00004; CHECK: debug_info contents
David Blaikie684fc532013-05-06 23:33:07 +00005; CHECK: [[NS1:0x[0-9a-f]*]]:{{ *}}DW_TAG_namespace
David Blaikie4f278f92013-03-20 06:27:06 +00006; CHECK-NEXT: DW_AT_name{{.*}} = "A"
Frederic Riss955724e2014-09-22 12:36:04 +00007; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F1:".*debug-info-namespace.cpp"]])
Frederic Rissfdccfc12014-11-18 02:46:11 +00008; CHECK-NEXT: DW_AT_decl_line{{.*}}(5)
David Blaikiefdabd482013-03-20 05:15:37 +00009; CHECK-NOT: NULL
David Blaikief55abea2013-04-22 06:12:31 +000010; CHECK: [[NS2:0x[0-9a-f]*]]:{{ *}}DW_TAG_namespace
David Blaikiea354eed2013-03-20 19:14:16 +000011; CHECK-NEXT: DW_AT_name{{.*}} = "B"
Frederic Riss955724e2014-09-22 12:36:04 +000012; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2:".*foo.cpp"]])
Frederic Riss0982e692014-09-05 07:21:50 +000013; CHECK-NEXT: DW_AT_decl_line{{.*}}(1)
David Blaikiea354eed2013-03-20 19:14:16 +000014; CHECK-NOT: NULL
David Blaikie3b6038b2013-05-08 06:01:41 +000015; CHECK: [[I:0x[0-9a-f]*]]:{{ *}}DW_TAG_variable
David Blaikiefdabd482013-03-20 05:15:37 +000016; CHECK-NEXT: DW_AT_name{{.*}}= "i"
Frederic Rissfdccfc12014-11-18 02:46:11 +000017; CHECK: [[VAR_FWD:0x[0-9a-f]*]]:{{ *}}DW_TAG_variable
18; CHECK-NEXT: DW_AT_name{{.*}}= "var_fwd"
David Blaikie3b6038b2013-05-08 06:01:41 +000019; CHECK-NOT: NULL
David Blaikie3b6038b2013-05-08 06:01:41 +000020; 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"
Amjad Aboud6ff7e102016-03-24 13:30:16 +000026; 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 Blaikie3c2fff32014-05-27 18:37:48 +000031; 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 Rissfdccfc12014-11-18 02:46:11 +000036; 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 Blaikie3b6038b2013-05-08 06:01:41 +000053; CHECK: NULL
54
55; CHECK-NOT: NULL
David Blaikie684fc532013-05-06 23:33:07 +000056; CHECK: DW_TAG_imported_module
57; This is a bug, it should be in F2 but it inherits the file from its
58; enclosing scope
Frederic Riss955724e2014-09-22 12:36:04 +000059; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F1]])
Frederic Rissfdccfc12014-11-18 02:46:11 +000060; CHECK-NEXT: DW_AT_decl_line{{.*}}(15)
David Blaikie684fc532013-05-06 23:33:07 +000061; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS2]]})
David Blaikie6baa7762013-05-07 17:57:13 +000062; CHECK: NULL
63; CHECK-NOT: NULL
David Blaikie684fc532013-05-06 23:33:07 +000064
David Blaikie3c2fff32014-05-27 18:37:48 +000065; CHECK: DW_TAG_imported_module
66; Same bug as above, this should be F2, not F1
Frederic Riss955724e2014-09-22 12:36:04 +000067; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F1]])
Frederic Rissfdccfc12014-11-18 02:46:11 +000068; CHECK-NEXT: DW_AT_decl_line{{.*}}(18)
David Blaikie3c2fff32014-05-27 18:37:48 +000069; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS1]]})
70; CHECK-NOT: NULL
71
David Blaikief55abea2013-04-22 06:12:31 +000072; CHECK: DW_TAG_subprogram
David Blaikie2f753512014-05-23 21:11:46 +000073; CHECK-NOT: DW_TAG
Amjad Aboud6ff7e102016-03-24 13:30:16 +000074; CHECK: DW_AT_name{{.*}}= "__cxx_global_var_init"
75; CHECK-NOT: DW_TAG
76
77; CHECK: DW_TAG_subprogram
78; CHECK-NOT: DW_TAG
David Blaikie2f753512014-05-23 21:11:46 +000079; CHECK: DW_AT_MIPS_linkage_name
80; CHECK-NOT: DW_TAG
81; CHECK: DW_AT_name{{.*}}= "func"
David Blaikief55abea2013-04-22 06:12:31 +000082; CHECK-NOT: NULL
Amjad Aboud6ff7e102016-03-24 13:30:16 +000083; CHECK: DW_TAG_lexical_block
84; CHECK-NOT: NULL
85; CHECK: DW_TAG_imported_module
86; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
87; CHECK-NEXT: DW_AT_decl_line{{.*}}(23)
88; CHECK-NEXT: DW_AT_import{{.*}}=>
89; CHECK: NULL
90; CHECK-NOT: NULL
David Blaikief55abea2013-04-22 06:12:31 +000091; CHECK: DW_TAG_imported_module
Frederic Riss955724e2014-09-22 12:36:04 +000092; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
Frederic Rissfdccfc12014-11-18 02:46:11 +000093; CHECK-NEXT: DW_AT_decl_line{{.*}}(26)
David Blaikie684fc532013-05-06 23:33:07 +000094; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS1]]})
95; CHECK-NOT: NULL
David Blaikie3b6038b2013-05-08 06:01:41 +000096; CHECK: DW_TAG_imported_declaration
Frederic Riss955724e2014-09-22 12:36:04 +000097; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
Frederic Rissfdccfc12014-11-18 02:46:11 +000098; CHECK-NEXT: DW_AT_decl_line{{.*}}(27)
David Blaikie3b6038b2013-05-08 06:01:41 +000099; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FOO]]})
100; CHECK-NOT: NULL
101; CHECK: DW_TAG_imported_declaration
Frederic Riss955724e2014-09-22 12:36:04 +0000102; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
Frederic Rissfdccfc12014-11-18 02:46:11 +0000103; CHECK-NEXT: DW_AT_decl_line{{.*}}(28)
David Blaikie3b6038b2013-05-08 06:01:41 +0000104; CHECK-NEXT: DW_AT_import{{.*}}=> {[[BAR]]})
105; CHECK-NOT: NULL
106; CHECK: DW_TAG_imported_declaration
Frederic Riss955724e2014-09-22 12:36:04 +0000107; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
Frederic Rissfdccfc12014-11-18 02:46:11 +0000108; CHECK-NEXT: DW_AT_decl_line{{.*}}(29)
David Blaikie3b6038b2013-05-08 06:01:41 +0000109; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FUNC1]]})
110; CHECK-NOT: NULL
111; CHECK: DW_TAG_imported_declaration
Frederic Riss955724e2014-09-22 12:36:04 +0000112; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
Frederic Rissfdccfc12014-11-18 02:46:11 +0000113; CHECK-NEXT: DW_AT_decl_line{{.*}}(30)
David Blaikie3b6038b2013-05-08 06:01:41 +0000114; CHECK-NEXT: DW_AT_import{{.*}}=> {[[I]]})
115; CHECK-NOT: NULL
Frederic Rissfdccfc12014-11-18 02:46:11 +0000116; CHECK: DW_TAG_imported_declaration
117; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
118; CHECK-NEXT: DW_AT_decl_line{{.*}}(31)
119; CHECK-NEXT: DW_AT_import{{.*}}=> {[[BAZ]]})
120; CHECK-NOT: NULL
David Blaikie2a40c142014-04-06 06:29:01 +0000121; CHECK: [[X:0x[0-9a-f]*]]:{{ *}}DW_TAG_imported_declaration
Frederic Riss955724e2014-09-22 12:36:04 +0000122; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
Frederic Rissfdccfc12014-11-18 02:46:11 +0000123; CHECK-NEXT: DW_AT_decl_line{{.*}}(32)
David Blaikiee63d5d12013-05-20 22:50:35 +0000124; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS1]]})
125; CHECK-NEXT: DW_AT_name{{.*}}"X"
126; CHECK-NOT: NULL
David Blaikie2a40c142014-04-06 06:29:01 +0000127; CHECK: DW_TAG_imported_declaration
Frederic Riss955724e2014-09-22 12:36:04 +0000128; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
Frederic Rissfdccfc12014-11-18 02:46:11 +0000129; CHECK-NEXT: DW_AT_decl_line{{.*}}(33)
David Blaikiee63d5d12013-05-20 22:50:35 +0000130; CHECK-NEXT: DW_AT_import{{.*}}=> {[[X]]})
131; CHECK-NEXT: DW_AT_name{{.*}}"Y"
132; CHECK-NOT: NULL
Frederic Rissfdccfc12014-11-18 02:46:11 +0000133; CHECK: DW_TAG_imported_declaration
134; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
135; CHECK-NEXT: DW_AT_decl_line{{.*}}(34)
136; CHECK-NEXT: DW_AT_import{{.*}}=> {[[VAR_DECL]]})
137; CHECK: DW_TAG_imported_declaration
138; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
139; CHECK-NEXT: DW_AT_decl_line{{.*}}(35)
140; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FUNC_DECL]]})
141; CHECK: DW_TAG_imported_declaration
142; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
143; CHECK-NEXT: DW_AT_decl_line{{.*}}(36)
144; CHECK-NEXT: DW_AT_import{{.*}}=> {[[VAR_FWD]]})
145; CHECK: DW_TAG_imported_declaration
146; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
147; CHECK-NEXT: DW_AT_decl_line{{.*}}(37)
148; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FUNC_FWD]]})
149
David Blaikie6baa7762013-05-07 17:57:13 +0000150; CHECK: NULL
David Blaikie3c2fff32014-05-27 18:37:48 +0000151; CHECK: NULL
David Blaikie684fc532013-05-06 23:33:07 +0000152
David Blaikiefdabd482013-03-20 05:15:37 +0000153; IR generated from clang/test/CodeGenCXX/debug-info-namespace.cpp, file paths
David Blaikie3b6038b2013-05-08 06:01:41 +0000154; changed to protect the guilty. The C++ source code is:
Frederic Rissfdccfc12014-11-18 02:46:11 +0000155; // RUN...
156; // RUN...
157; // RUN...
158;
David Blaikiefdabd482013-03-20 05:15:37 +0000159; namespace A {
David Blaikiea354eed2013-03-20 19:14:16 +0000160; #line 1 "foo.cpp"
161; namespace B {
Frederic Rissfdccfc12014-11-18 02:46:11 +0000162; extern int i;
163; int f1() { return 0; }
David Blaikie3b6038b2013-05-08 06:01:41 +0000164; void f1(int) { }
165; struct foo;
166; struct bar { };
Frederic Rissfdccfc12014-11-18 02:46:11 +0000167; typedef bar baz;
168; extern int var_decl;
169; void func_decl(void);
170; extern int var_fwd;
171; void func_fwd(void);
David Blaikiefdabd482013-03-20 05:15:37 +0000172; }
Frederic Rissfdccfc12014-11-18 02:46:11 +0000173; }
174; namespace A {
David Blaikie684fc532013-05-06 23:33:07 +0000175; using namespace B;
David Blaikiea354eed2013-03-20 19:14:16 +0000176; }
David Blaikief55abea2013-04-22 06:12:31 +0000177;
David Blaikie684fc532013-05-06 23:33:07 +0000178; using namespace A;
Frederic Rissfdccfc12014-11-18 02:46:11 +0000179; namespace E = A;
180; int B::i = f1();
David Blaikie684fc532013-05-06 23:33:07 +0000181; int func(bool b) {
182; if (b) {
183; using namespace A::B;
184; return i;
185; }
186; using namespace A;
David Blaikie3b6038b2013-05-08 06:01:41 +0000187; using B::foo;
188; using B::bar;
189; using B::f1;
190; using B::i;
Frederic Rissfdccfc12014-11-18 02:46:11 +0000191; using B::baz;
David Blaikiee63d5d12013-05-20 22:50:35 +0000192; namespace X = A;
193; namespace Y = X;
Frederic Rissfdccfc12014-11-18 02:46:11 +0000194; using B::var_decl;
195; using B::func_decl;
196; using B::var_fwd;
197; using B::func_fwd;
David Blaikiee63d5d12013-05-20 22:50:35 +0000198; return i + X::B::i + Y::B::i;
David Blaikief55abea2013-04-22 06:12:31 +0000199; }
Frederic Rissfdccfc12014-11-18 02:46:11 +0000200;
201; namespace A {
202; using B::i;
203; namespace B {
204; int var_fwd = i;
205; }
206; }
207; void B::func_fwd() {}
David Blaikie3b6038b2013-05-08 06:01:41 +0000208
David Blaikiea354eed2013-03-20 19:14:16 +0000209@_ZN1A1B1iE = global i32 0, align 4
Frederic Rissfdccfc12014-11-18 02:46:11 +0000210@_ZN1A1B7var_fwdE = global i32 0, align 4
211@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 Blaikiefdabd482013-03-20 05:15:37 +0000212
Frederic Rissfdccfc12014-11-18 02:46:11 +0000213; Function Attrs: nounwind ssp uwtable
Peter Collingbourned4bff302015-11-05 22:03:56 +0000214define i32 @_ZN1A1B2f1Ev() #0 !dbg !10 {
David Blaikie3b6038b2013-05-08 06:01:41 +0000215entry:
Frederic Rissfdccfc12014-11-18 02:46:11 +0000216 ret i32 0, !dbg !60
David Blaikie3b6038b2013-05-08 06:01:41 +0000217}
218
Frederic Rissfdccfc12014-11-18 02:46:11 +0000219; Function Attrs: nounwind ssp uwtable
Peter Collingbourned4bff302015-11-05 22:03:56 +0000220define void @_ZN1A1B2f1Ei(i32) #0 !dbg !14 {
David Blaikie3b6038b2013-05-08 06:01:41 +0000221entry:
222 %.addr = alloca i32, align 4
223 store i32 %0, i32* %.addr, align 4
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000224 call void @llvm.dbg.declare(metadata i32* %.addr, metadata !61, metadata !62), !dbg !63
Frederic Rissfdccfc12014-11-18 02:46:11 +0000225 ret void, !dbg !64
David Blaikie3b6038b2013-05-08 06:01:41 +0000226}
227
228; Function Attrs: nounwind readnone
Adrian Prantl87b7eb92014-10-01 18:55:02 +0000229declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
David Blaikie3b6038b2013-05-08 06:01:41 +0000230
Peter Collingbourned4bff302015-11-05 22:03:56 +0000231define internal void @__cxx_global_var_init() section "__TEXT,__StaticInit,regular,pure_instructions" !dbg !17 {
Frederic Rissfdccfc12014-11-18 02:46:11 +0000232entry:
233 %call = call i32 @_ZN1A1B2f1Ev(), !dbg !65
234 store i32 %call, i32* @_ZN1A1B1iE, align 4, !dbg !65
235 ret void, !dbg !65
236}
237
238; Function Attrs: nounwind ssp uwtable
Peter Collingbourned4bff302015-11-05 22:03:56 +0000239define i32 @_Z4funcb(i1 zeroext %b) #0 !dbg !21 {
David Blaikief55abea2013-04-22 06:12:31 +0000240entry:
David Blaikie684fc532013-05-06 23:33:07 +0000241 %retval = alloca i32, align 4
242 %b.addr = alloca i8, align 1
243 %frombool = zext i1 %b to i8
244 store i8 %frombool, i8* %b.addr, align 1
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000245 call void @llvm.dbg.declare(metadata i8* %b.addr, metadata !66, metadata !62), !dbg !67
David Blaikiea79ac142015-02-27 21:17:42 +0000246 %0 = load i8, i8* %b.addr, align 1, !dbg !68
Frederic Rissfdccfc12014-11-18 02:46:11 +0000247 %tobool = trunc i8 %0 to i1, !dbg !68
248 br i1 %tobool, label %if.then, label %if.end, !dbg !68
David Blaikie684fc532013-05-06 23:33:07 +0000249
250if.then: ; preds = %entry
David Blaikiea79ac142015-02-27 21:17:42 +0000251 %1 = load i32, i32* @_ZN1A1B1iE, align 4, !dbg !69
Frederic Rissfdccfc12014-11-18 02:46:11 +0000252 store i32 %1, i32* %retval, !dbg !69
253 br label %return, !dbg !69
David Blaikie684fc532013-05-06 23:33:07 +0000254
255if.end: ; preds = %entry
David Blaikiea79ac142015-02-27 21:17:42 +0000256 %2 = load i32, i32* @_ZN1A1B1iE, align 4, !dbg !70
257 %3 = load i32, i32* @_ZN1A1B1iE, align 4, !dbg !70
Frederic Rissfdccfc12014-11-18 02:46:11 +0000258 %add = add nsw i32 %2, %3, !dbg !70
David Blaikiea79ac142015-02-27 21:17:42 +0000259 %4 = load i32, i32* @_ZN1A1B1iE, align 4, !dbg !70
Frederic Rissfdccfc12014-11-18 02:46:11 +0000260 %add1 = add nsw i32 %add, %4, !dbg !70
261 store i32 %add1, i32* %retval, !dbg !70
262 br label %return, !dbg !70
David Blaikie684fc532013-05-06 23:33:07 +0000263
264return: ; preds = %if.end, %if.then
David Blaikiea79ac142015-02-27 21:17:42 +0000265 %5 = load i32, i32* %retval, !dbg !71
Frederic Rissfdccfc12014-11-18 02:46:11 +0000266 ret i32 %5, !dbg !71
David Blaikief55abea2013-04-22 06:12:31 +0000267}
268
Peter Collingbourned4bff302015-11-05 22:03:56 +0000269define internal void @__cxx_global_var_init1() section "__TEXT,__StaticInit,regular,pure_instructions" !dbg !25 {
Frederic Rissfdccfc12014-11-18 02:46:11 +0000270entry:
David Blaikiea79ac142015-02-27 21:17:42 +0000271 %0 = load i32, i32* @_ZN1A1B1iE, align 4, !dbg !72
Frederic Rissfdccfc12014-11-18 02:46:11 +0000272 store i32 %0, i32* @_ZN1A1B7var_fwdE, align 4, !dbg !72
273 ret void, !dbg !72
274}
275
276; Function Attrs: nounwind ssp uwtable
Peter Collingbourned4bff302015-11-05 22:03:56 +0000277define void @_ZN1A1B8func_fwdEv() #0 !dbg !26 {
Frederic Rissfdccfc12014-11-18 02:46:11 +0000278entry:
279 ret void, !dbg !73
280}
281
282define internal void @_GLOBAL__sub_I_debug_info_namespace.cpp() section "__TEXT,__StaticInit,regular,pure_instructions" {
283entry:
284 call void @__cxx_global_var_init(), !dbg !74
285 call void @__cxx_global_var_init1(), !dbg !74
286 ret void, !dbg !74
287}
288
289attributes #0 = { nounwind ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
David Blaikie684fc532013-05-06 23:33:07 +0000290attributes #1 = { nounwind readnone }
David Blaikief55abea2013-04-22 06:12:31 +0000291
David Blaikiefdabd482013-03-20 05:15:37 +0000292!llvm.dbg.cu = !{!0}
Frederic Rissfdccfc12014-11-18 02:46:11 +0000293!llvm.module.flags = !{!57, !58}
294!llvm.ident = !{!59}
David Blaikiefdabd482013-03-20 05:15:37 +0000295
Duncan P. N. Exon Smith55ca9642015-08-03 17:26:41 +0000296!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: 1, file: !1, enums: !2, retainedTypes: !3, subprograms: !9, globals: !30, imports: !33)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000297!1 = !DIFile(filename: "debug-info-namespace.cpp", directory: "/tmp")
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000298!2 = !{}
299!3 = !{!4, !8}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000300!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 5, flags: DIFlagFwdDecl, file: !5, scope: !6, identifier: "_ZTSN1A1B3fooE")
301!5 = !DIFile(filename: "foo.cpp", directory: "/tmp")
302!6 = !DINamespace(name: "B", line: 1, file: !5, scope: !7)
303!7 = !DINamespace(name: "A", line: 5, file: !1, scope: null)
304!8 = !DICompositeType(tag: DW_TAG_structure_type, name: "bar", line: 6, size: 8, align: 8, file: !5, scope: !6, elements: !2, identifier: "_ZTSN1A1B3barE")
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000305!9 = !{!10, !14, !17, !21, !25, !26, !27}
Peter Collingbourned4bff302015-11-05 22:03:56 +0000306!10 = distinct !DISubprogram(name: "f1", linkageName: "_ZN1A1B2f1Ev", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !5, scope: !6, type: !11, variables: !2)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000307!11 = !DISubroutineType(types: !12)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000308!12 = !{!13}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000309!13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
Peter Collingbourned4bff302015-11-05 22:03:56 +0000310!14 = distinct !DISubprogram(name: "f1", linkageName: "_ZN1A1B2f1Ei", line: 4, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !6, type: !15, variables: !2)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000311!15 = !DISubroutineType(types: !16)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000312!16 = !{null, !13}
Peter Collingbourned4bff302015-11-05 22:03:56 +0000313!17 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 20, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 20, file: !5, scope: !18, type: !19, variables: !2)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000314!18 = !DIFile(filename: "foo.cpp", directory: "/tmp")
315!19 = !DISubroutineType(types: !20)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000316!20 = !{null}
Peter Collingbourned4bff302015-11-05 22:03:56 +0000317!21 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcb", line: 21, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 21, file: !5, scope: !18, type: !22, variables: !2)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000318!22 = !DISubroutineType(types: !23)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000319!23 = !{!13, !24}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000320!24 = !DIBasicType(tag: DW_TAG_base_type, name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean)
Peter Collingbourned4bff302015-11-05 22:03:56 +0000321!25 = distinct !DISubprogram(name: "__cxx_global_var_init1", line: 44, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 44, file: !5, scope: !18, type: !19, variables: !2)
322!26 = distinct !DISubprogram(name: "func_fwd", linkageName: "_ZN1A1B8func_fwdEv", line: 47, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 47, file: !5, scope: !6, type: !19, variables: !2)
323!27 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__sub_I_debug_info_namespace.cpp", isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: false, file: !1, scope: !28, type: !29, variables: !2)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000324!28 = !DIFile(filename: "debug-info-namespace.cpp", directory: "/tmp")
325!29 = !DISubroutineType(types: !2)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000326!30 = !{!31, !32}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000327!31 = !DIGlobalVariable(name: "i", linkageName: "_ZN1A1B1iE", line: 20, isLocal: false, isDefinition: true, scope: !6, file: !18, type: !13, variable: i32* @_ZN1A1B1iE)
328!32 = !DIGlobalVariable(name: "var_fwd", linkageName: "_ZN1A1B7var_fwdE", line: 44, isLocal: false, isDefinition: true, scope: !6, file: !18, type: !13, variable: i32* @_ZN1A1B7var_fwdE)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000329!33 = !{!34, !35, !36, !37, !40, !41, !42, !43, !44, !45, !47, !48, !49, !51, !54, !55, !56}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000330!34 = !DIImportedEntity(tag: DW_TAG_imported_module, line: 15, scope: !7, entity: !6)
331!35 = !DIImportedEntity(tag: DW_TAG_imported_module, line: 18, scope: !0, entity: !7)
332!36 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 19, name: "E", scope: !0, entity: !7)
333!37 = !DIImportedEntity(tag: DW_TAG_imported_module, line: 23, scope: !38, entity: !6)
334!38 = distinct !DILexicalBlock(line: 22, column: 10, file: !5, scope: !39)
335!39 = distinct !DILexicalBlock(line: 22, column: 7, file: !5, scope: !21)
336!40 = !DIImportedEntity(tag: DW_TAG_imported_module, line: 26, scope: !21, entity: !7)
337!41 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 27, scope: !21, entity: !"_ZTSN1A1B3fooE")
338!42 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 28, scope: !21, entity: !"_ZTSN1A1B3barE")
339!43 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 29, scope: !21, entity: !14)
340!44 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 30, scope: !21, entity: !31)
341!45 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 31, scope: !21, entity: !46)
342!46 = !DIDerivedType(tag: DW_TAG_typedef, name: "baz", line: 7, file: !5, scope: !6, baseType: !"_ZTSN1A1B3barE")
343!47 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 32, name: "X", scope: !21, entity: !7)
344!48 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 33, name: "Y", scope: !21, entity: !47)
345!49 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 34, scope: !21, entity: !50)
346!50 = !DIGlobalVariable(name: "var_decl", linkageName: "_ZN1A1B8var_declE", line: 8, isLocal: false, isDefinition: false, scope: !6, file: !18, type: !13)
347!51 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 35, scope: !21, entity: !52)
348!52 = !DISubprogram(name: "func_decl", linkageName: "_ZN1A1B9func_declEv", line: 9, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false, file: !5, scope: !6, type: !19, variables: !53)
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +0000349!53 = !{} ; previously: invalid DW_TAG_base_type
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000350!54 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 36, scope: !21, entity: !32)
351!55 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 37, scope: !21, entity: !26)
352!56 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 42, scope: !7, entity: !31)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000353!57 = !{i32 2, !"Dwarf Version", i32 2}
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +0000354!58 = !{i32 2, !"Debug Info Version", i32 3}
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000355!59 = !{!"clang version 3.6.0 "}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000356!60 = !DILocation(line: 3, column: 12, scope: !10)
Duncan P. N. Exon Smithed013cd2015-07-31 18:58:39 +0000357!61 = !DILocalVariable(name: "", line: 4, arg: 1, scope: !14, file: !18, type: !13)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000358!62 = !DIExpression()
359!63 = !DILocation(line: 4, column: 12, scope: !14)
360!64 = !DILocation(line: 4, column: 16, scope: !14)
361!65 = !DILocation(line: 20, column: 12, scope: !17)
Duncan P. N. Exon Smithed013cd2015-07-31 18:58:39 +0000362!66 = !DILocalVariable(name: "b", line: 21, arg: 1, scope: !21, file: !18, type: !24)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000363!67 = !DILocation(line: 21, column: 15, scope: !21)
364!68 = !DILocation(line: 22, column: 7, scope: !21)
365!69 = !DILocation(line: 24, column: 5, scope: !38)
366!70 = !DILocation(line: 38, column: 3, scope: !21)
367!71 = !DILocation(line: 39, column: 1, scope: !21)
368!72 = !DILocation(line: 44, column: 15, scope: !25)
369!73 = !DILocation(line: 47, column: 21, scope: !26)
370!74 = !DILocation(line: 0, scope: !75)
371!75 = !DILexicalBlockFile(discriminator: 0, file: !5, scope: !27)