blob: 026e086610572a060b5407d02ec0e9832b7a3230 [file] [log] [blame]
David Blaikie404d3042013-09-19 23:01:29 +00001; RUN: llc -mtriple=x86_64-pc-linux-gnu -generate-gnu-dwarf-pub-sections < %s | FileCheck -check-prefix=ASM %s
2; RUN: llc -mtriple=x86_64-pc-linux-gnu -generate-gnu-dwarf-pub-sections -filetype=obj < %s | llvm-dwarfdump - | FileCheck %s
Eric Christopherdd1a0122013-09-13 00:35:05 +00003; ModuleID = 'dwarf-public-names.cpp'
4;
5; Generated from:
6;
7; struct C {
8; void member_function();
9; static int static_member_function();
10; static int static_member_variable;
11; };
12;
13; int C::static_member_variable = 0;
14;
15; void C::member_function() {
16; static_member_variable = 0;
17; }
18;
19; int C::static_member_function() {
20; return static_member_variable;
21; }
22;
23; C global_variable;
24;
25; int global_function() {
26; return -1;
27; }
28;
29; namespace ns {
30; void global_namespace_function() {
31; global_variable.member_function();
32; }
33; int global_namespace_variable = 1;
David Blaikie877354a2015-04-14 18:08:25 +000034; extern int global_namespace_variable_decl;
Eric Christopher2c8b7902013-10-17 02:06:06 +000035; struct D {
36; int A;
37; } d;
Eric Christopherdd1a0122013-09-13 00:35:05 +000038; }
David Blaikie877354a2015-04-14 18:08:25 +000039;
40; using ns::global_namespace_variable_decl;
41;
42; namespace {
43; int i;
44; }
45;
46; int *f3() {
47; static int z;
48; return &z;
49; }
50;
51; namespace {
52; namespace inner {
53; int b;
54; }
55; }
56;
57; namespace outer {
58; namespace {
59; int c;
60; }
61; }
62;
63; int f7() {
64; return i + *f3() + inner::b + outer::c;
65; }
Eric Christopherdd1a0122013-09-13 00:35:05 +000066
Eric Christopher261d2342013-09-23 20:55:35 +000067; ASM: .section .debug_gnu_pubnames
David Blaikie404d3042013-09-19 23:01:29 +000068; ASM: .byte 32 # Kind: VARIABLE, EXTERNAL
Eric Christopher2c8b7902013-10-17 02:06:06 +000069; ASM-NEXT: .asciz "global_variable" # External Name
David Blaikie404d3042013-09-19 23:01:29 +000070
Eric Christopher261d2342013-09-23 20:55:35 +000071; ASM: .section .debug_gnu_pubtypes
72; ASM: .byte 16 # Kind: TYPE, EXTERNAL
David Blaikieecd21ff2013-09-24 19:50:00 +000073; ASM-NEXT: .asciz "C" # External Name
Eric Christopher261d2342013-09-23 20:55:35 +000074
David Blaikieac30f9e2013-09-19 23:43:46 +000075; CHECK: .debug_info contents:
David Blaikiefcf31a72014-06-06 18:45:14 +000076; CHECK: Compile Unit:
David Blaikie47c254b2014-03-06 05:47:39 +000077; CHECK: DW_AT_GNU_pubnames [DW_FORM_flag_present] (true)
78; CHECK-NOT: DW_AT_GNU_pubtypes [
Eric Christopherd2b497b2013-10-16 01:37:49 +000079
David Blaikie49cfc8c2014-10-23 19:12:43 +000080; CHECK: [[STATIC_MEM_VAR:0x[0-9a-f]+]]: DW_TAG_variable
81; CHECK-NEXT: DW_AT_specification {{.*}} "static_member_variable"
82
David Blaikiefcf31a72014-06-06 18:45:14 +000083; CHECK: [[C:0x[0-9a-f]+]]: DW_TAG_structure_type
David Blaikieecd21ff2013-09-24 19:50:00 +000084; CHECK-NEXT: DW_AT_name {{.*}} "C"
Eric Christopherd2b497b2013-10-16 01:37:49 +000085
Frederic Rissd4de1802014-10-10 15:51:02 +000086; CHECK: DW_TAG_member
Eric Christopherd2b497b2013-10-16 01:37:49 +000087; CHECK-NEXT: DW_AT_name {{.*}} "static_member_variable"
88
Frederic Rissd1cfc3c2014-10-06 03:36:31 +000089; CHECK: DW_TAG_subprogram
Paul Robinson857b4432015-03-10 22:44:45 +000090; CHECK-NEXT: DW_AT_linkage_name
David Blaikieac30f9e2013-09-19 23:43:46 +000091; CHECK-NEXT: DW_AT_name {{.*}} "member_function"
Eric Christopherd2b497b2013-10-16 01:37:49 +000092
Frederic Rissd1cfc3c2014-10-06 03:36:31 +000093; CHECK: DW_TAG_subprogram
Paul Robinson857b4432015-03-10 22:44:45 +000094; CHECK-NEXT: DW_AT_linkage_name
David Blaikieac30f9e2013-09-19 23:43:46 +000095; CHECK-NEXT: DW_AT_name {{.*}} "static_member_function"
Eric Christopherd2b497b2013-10-16 01:37:49 +000096
David Blaikiefcf31a72014-06-06 18:45:14 +000097; CHECK: [[INT:0x[0-9a-f]+]]: DW_TAG_base_type
Manman Renf4c339e2013-10-29 22:49:29 +000098; CHECK-NEXT: DW_AT_name {{.*}} "int"
99
David Blaikiefcf31a72014-06-06 18:45:14 +0000100; CHECK: [[GLOB_VAR:0x[0-9a-f]+]]: DW_TAG_variable
David Blaikieac30f9e2013-09-19 23:43:46 +0000101; CHECK-NEXT: DW_AT_name {{.*}} "global_variable"
Eric Christopherd2b497b2013-10-16 01:37:49 +0000102
David Blaikiefcf31a72014-06-06 18:45:14 +0000103; CHECK: [[NS:0x[0-9a-f]+]]: DW_TAG_namespace
Eric Christopherd2b497b2013-10-16 01:37:49 +0000104; CHECK-NEXT: DW_AT_name {{.*}} "ns"
105
David Blaikie49cfc8c2014-10-23 19:12:43 +0000106; CHECK: [[GLOB_NS_VAR:0x[0-9a-f]+]]: DW_TAG_variable
David Blaikieac30f9e2013-09-19 23:43:46 +0000107; CHECK-NEXT: DW_AT_name {{.*}} "global_namespace_variable"
David Blaikie49cfc8c2014-10-23 19:12:43 +0000108; CHECK-NOT: DW_AT_specification
109; CHECK: DW_AT_location
110; CHECK-NOT: DW_AT_specification
Eric Christopherd2b497b2013-10-16 01:37:49 +0000111
David Blaikie49cfc8c2014-10-23 19:12:43 +0000112; CHECK: [[D_VAR:0x[0-9a-f]+]]: DW_TAG_variable
Eric Christopher2c8b7902013-10-17 02:06:06 +0000113; CHECK-NEXT: DW_AT_name {{.*}} "d"
David Blaikie49cfc8c2014-10-23 19:12:43 +0000114; CHECK-NOT: DW_AT_specification
115; CHECK: DW_AT_location
116; CHECK-NOT: DW_AT_specification
Eric Christopher2c8b7902013-10-17 02:06:06 +0000117
David Blaikiefcf31a72014-06-06 18:45:14 +0000118; CHECK: [[D:0x[0-9a-f]+]]: DW_TAG_structure_type
Manman Renf6b936b2013-10-29 05:49:41 +0000119; CHECK-NEXT: DW_AT_name {{.*}} "D"
120
David Blaikiefcf31a72014-06-06 18:45:14 +0000121; CHECK: [[GLOB_NS_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
David Blaikie2f753512014-05-23 21:11:46 +0000122; CHECK-NOT: DW_TAG
Paul Robinson857b4432015-03-10 22:44:45 +0000123; CHECK: DW_AT_linkage_name
David Blaikie2f753512014-05-23 21:11:46 +0000124; CHECK-NOT: DW_TAG
125; CHECK: DW_AT_name {{.*}} "global_namespace_function"
Amjad Aboud72da9392016-04-30 01:44:07 +0000126
127; CHECK: DW_TAG_subprogram
128; CHECK-NOT: DW_TAG
129; CHECK: DW_AT_name {{.*}} "f3"
130; CHECK-NOT: {{DW_TAG|NULL}}
131; CHECK: [[F3_Z:.*]]: DW_TAG_variable
132; CHECK-NOT: DW_TAG
133; CHECK: DW_AT_name {{.*}} "z"
134; CHECK-NOT: {{DW_TAG|NULL}}
135; CHECK: DW_AT_location
136; CHECK-NOT: {{DW_TAG|NULL}}
David Blaikie553eb4a2014-06-06 22:16:56 +0000137; CHECK: NULL
138; CHECK-NOT: {{DW_TAG|NULL}}
139
David Blaikie5f7095e2015-04-14 17:17:04 +0000140; CHECK: [[ANON:.*]]: DW_TAG_namespace
141; CHECK-NOT: DW_AT_name
142; CHECK: [[ANON_I:.*]]: DW_TAG_variable
143; CHECK-NOT: DW_TAG
144; CHECK: DW_AT_name {{.*}} "i"
145; CHECK-NOT: {{DW_TAG|NULL}}
146; CHECK: [[ANON_INNER:.*]]: DW_TAG_namespace
147; CHECK-NOT: DW_TAG
148; CHECK: DW_AT_name {{.*}} "inner"
149; CHECK-NOT: {{DW_TAG|NULL}}
150; CHECK: [[ANON_INNER_B:.*]]: DW_TAG_variable
151; CHECK-NOT: DW_TAG
152; CHECK: DW_AT_name {{.*}} "b"
153; CHECK-NOT: {{DW_TAG|NULL}}
154; CHECK: NULL
155; CHECK-NOT: {{DW_TAG|NULL}}
156; CHECK: NULL
157; CHECK-NOT: {{DW_TAG|NULL}}
158
David Blaikie553eb4a2014-06-06 22:16:56 +0000159; CHECK: [[OUTER:.*]]: DW_TAG_namespace
160; CHECK-NOT: DW_TAG
161; CHECK: DW_AT_name {{.*}} "outer"
162; CHECK-NOT: {{DW_TAG|NULL}}
163; CHECK: [[OUTER_ANON:.*]]: DW_TAG_namespace
164; CHECK-NOT: {{DW_TAG|NULL}}
165; CHECK-NOT: DW_AT_name
David Blaikie49cfc8c2014-10-23 19:12:43 +0000166; CHECK: [[OUTER_ANON_C:.*]]: DW_TAG_variable
David Blaikie553eb4a2014-06-06 22:16:56 +0000167; CHECK-NOT: DW_TAG
168; CHECK: DW_AT_name {{.*}} "c"
169; CHECK-NOT: {{DW_TAG|NULL}}
170; CHECK: NULL
171; CHECK-NOT: {{DW_TAG|NULL}}
172; FIXME: We probably shouldn't bother describing the implicit
Alp Toker5c536392014-06-07 21:23:09 +0000173; import of the preceding anonymous namespace. This should be fixed
David Blaikie553eb4a2014-06-06 22:16:56 +0000174; in clang.
175; CHECK: DW_TAG_imported_module
176; CHECK-NOT: {{DW_TAG|NULL}}
177; CHECK: NULL
178; CHECK-NOT: {{DW_TAG|NULL}}
David Blaikie553eb4a2014-06-06 22:16:56 +0000179
David Blaikie877354a2015-04-14 18:08:25 +0000180; CHECK: DW_TAG_imported_declaration
181; CHECK-NOT: {{DW_TAG|NULL}}
182
David Blaikiefcf31a72014-06-06 18:45:14 +0000183; CHECK: [[MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
David Blaikie2f753512014-05-23 21:11:46 +0000184; CHECK-NOT: DW_TAG
Frederic Rissd1cfc3c2014-10-06 03:36:31 +0000185; CHECK: DW_AT_specification {{.*}} "_ZN1C15member_functionEv"
Eric Christopherd2b497b2013-10-16 01:37:49 +0000186
David Blaikiefcf31a72014-06-06 18:45:14 +0000187; CHECK: [[STATIC_MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
David Blaikie2f753512014-05-23 21:11:46 +0000188; CHECK-NOT: DW_TAG
Frederic Rissd1cfc3c2014-10-06 03:36:31 +0000189; CHECK: DW_AT_specification {{.*}} "_ZN1C22static_member_functionEv"
Eric Christopherd2b497b2013-10-16 01:37:49 +0000190
David Blaikiefcf31a72014-06-06 18:45:14 +0000191; CHECK: [[GLOBAL_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
David Blaikie2f753512014-05-23 21:11:46 +0000192; CHECK-NOT: DW_TAG
Paul Robinson857b4432015-03-10 22:44:45 +0000193; CHECK: DW_AT_linkage_name
David Blaikie2f753512014-05-23 21:11:46 +0000194; CHECK-NOT: DW_TAG
195; CHECK: DW_AT_name {{.*}} "global_function"
David Blaikieac30f9e2013-09-19 23:43:46 +0000196
197; CHECK-LABEL: .debug_gnu_pubnames contents:
David Blaikiefcf31a72014-06-06 18:45:14 +0000198; CHECK-NEXT: length = {{.*}} version = 0x0002 unit_offset = 0x00000000 unit_size = {{.*}}
David Blaikie404d3042013-09-19 23:01:29 +0000199; CHECK-NEXT: Offset Linkage Kind Name
David Blaikie877354a2015-04-14 18:08:25 +0000200; CHECK-NEXT: [[GLOBAL_FUNC]] EXTERNAL FUNCTION "global_function"
201; CHECK-NEXT: [[NS]] EXTERNAL TYPE "ns"
202; CHECK-NEXT: [[OUTER_ANON_C]] STATIC VARIABLE "outer::(anonymous namespace)::c"
203; CHECK-NEXT: [[ANON_I]] STATIC VARIABLE "(anonymous namespace)::i"
David Blaikie553eb4a2014-06-06 22:16:56 +0000204; GCC Doesn't put local statics in pubnames, but it seems not unreasonable and
205; comes out naturally from LLVM's implementation, so I'm OK with it for now. If
206; it's demonstrated that this is a major size concern or degrades debug info
207; consumer behavior, feel free to change it.
David Blaikie877354a2015-04-14 18:08:25 +0000208; CHECK-NEXT: [[F3_Z]] STATIC VARIABLE "f3::z"
Amjad Aboud72da9392016-04-30 01:44:07 +0000209; CHECK-NEXT: [[ANON]] EXTERNAL TYPE "(anonymous namespace)"
David Blaikie877354a2015-04-14 18:08:25 +0000210; CHECK-NEXT: [[OUTER_ANON]] EXTERNAL TYPE "outer::(anonymous namespace)"
211; CHECK-NEXT: [[ANON_INNER_B]] STATIC VARIABLE "(anonymous namespace)::inner::b"
212; CHECK-NEXT: [[OUTER]] EXTERNAL TYPE "outer"
213; CHECK-NEXT: [[MEM_FUNC]] EXTERNAL FUNCTION "C::member_function"
214; CHECK-NEXT: [[GLOB_VAR]] EXTERNAL VARIABLE "global_variable"
215; CHECK-NEXT: [[GLOB_NS_VAR]] EXTERNAL VARIABLE "ns::global_namespace_variable"
216; CHECK-NEXT: [[ANON_INNER]] EXTERNAL TYPE "(anonymous namespace)::inner"
217; CHECK-NEXT: [[D_VAR]] EXTERNAL VARIABLE "ns::d"
218; CHECK-NEXT: [[GLOB_NS_FUNC]] EXTERNAL FUNCTION "ns::global_namespace_function"
219; CHECK-NEXT: [[STATIC_MEM_VAR]] EXTERNAL VARIABLE "C::static_member_variable"
220; CHECK-NEXT: [[STATIC_MEM_FUNC]] EXTERNAL FUNCTION "C::static_member_function"
David Blaikie553eb4a2014-06-06 22:16:56 +0000221
Eric Christopher2c8b7902013-10-17 02:06:06 +0000222
Eric Christopherdd1a0122013-09-13 00:35:05 +0000223
David Blaikieecd21ff2013-09-24 19:50:00 +0000224; CHECK-LABEL: debug_gnu_pubtypes contents:
David Blaikie2ede02f2013-11-01 17:53:30 +0000225; CHECK: Offset Linkage Kind Name
Eric Christopherd2b497b2013-10-16 01:37:49 +0000226; CHECK-DAG: [[C]] EXTERNAL TYPE "C"
Eric Christopher2c8b7902013-10-17 02:06:06 +0000227; CHECK-DAG: [[D]] EXTERNAL TYPE "ns::D"
Eric Christopherd2b497b2013-10-16 01:37:49 +0000228; CHECK-DAG: [[INT]] STATIC TYPE "int"
David Blaikieecd21ff2013-09-24 19:50:00 +0000229
Eric Christopherdd1a0122013-09-13 00:35:05 +0000230%struct.C = type { i8 }
Eric Christopher2c8b7902013-10-17 02:06:06 +0000231%"struct.ns::D" = type { i32 }
Eric Christopherdd1a0122013-09-13 00:35:05 +0000232
233@_ZN1C22static_member_variableE = global i32 0, align 4
234@global_variable = global %struct.C zeroinitializer, align 1
235@_ZN2ns25global_namespace_variableE = global i32 1, align 4
Eric Christopher2c8b7902013-10-17 02:06:06 +0000236@_ZN2ns1dE = global %"struct.ns::D" zeroinitializer, align 4
David Blaikie553eb4a2014-06-06 22:16:56 +0000237@_ZZ2f3vE1z = internal global i32 0, align 4
238@_ZN12_GLOBAL__N_11iE = internal global i32 0, align 4
239@_ZN12_GLOBAL__N_15inner1bE = internal global i32 0, align 4
240@_ZN5outer12_GLOBAL__N_11cE = internal global i32 0, align 4
Eric Christopherdd1a0122013-09-13 00:35:05 +0000241
Eric Christopherfa986e72013-09-24 00:17:54 +0000242; Function Attrs: nounwind uwtable
Peter Collingbourned4bff302015-11-05 22:03:56 +0000243define void @_ZN1C15member_functionEv(%struct.C* %this) #0 align 2 !dbg !20 {
Eric Christopherdd1a0122013-09-13 00:35:05 +0000244entry:
245 %this.addr = alloca %struct.C*, align 8
246 store %struct.C* %this, %struct.C** %this.addr, align 8
David Blaikie877354a2015-04-14 18:08:25 +0000247 call void @llvm.dbg.declare(metadata %struct.C** %this.addr, metadata !51, metadata !53), !dbg !54
David Blaikiea79ac142015-02-27 21:17:42 +0000248 %this1 = load %struct.C*, %struct.C** %this.addr
David Blaikie877354a2015-04-14 18:08:25 +0000249 store i32 0, i32* @_ZN1C22static_member_variableE, align 4, !dbg !55
250 ret void, !dbg !56
Eric Christopherdd1a0122013-09-13 00:35:05 +0000251}
252
Eric Christopherfa986e72013-09-24 00:17:54 +0000253; Function Attrs: nounwind readnone
Adrian Prantl87b7eb92014-10-01 18:55:02 +0000254declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
Eric Christopherdd1a0122013-09-13 00:35:05 +0000255
Eric Christopherfa986e72013-09-24 00:17:54 +0000256; Function Attrs: nounwind uwtable
Peter Collingbourned4bff302015-11-05 22:03:56 +0000257define i32 @_ZN1C22static_member_functionEv() #0 align 2 !dbg !21 {
Eric Christopherdd1a0122013-09-13 00:35:05 +0000258entry:
David Blaikie877354a2015-04-14 18:08:25 +0000259 %0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !57
260 ret i32 %0, !dbg !57
Eric Christopherdd1a0122013-09-13 00:35:05 +0000261}
262
Eric Christopherfa986e72013-09-24 00:17:54 +0000263; Function Attrs: nounwind uwtable
Peter Collingbourned4bff302015-11-05 22:03:56 +0000264define i32 @_Z15global_functionv() #0 !dbg !22 {
Eric Christopherdd1a0122013-09-13 00:35:05 +0000265entry:
David Blaikie877354a2015-04-14 18:08:25 +0000266 ret i32 -1, !dbg !58
Eric Christopherdd1a0122013-09-13 00:35:05 +0000267}
268
Eric Christopherfa986e72013-09-24 00:17:54 +0000269; Function Attrs: nounwind uwtable
Peter Collingbourned4bff302015-11-05 22:03:56 +0000270define void @_ZN2ns25global_namespace_functionEv() #0 !dbg !23 {
Eric Christopherdd1a0122013-09-13 00:35:05 +0000271entry:
David Blaikie877354a2015-04-14 18:08:25 +0000272 call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !59
273 ret void, !dbg !60
David Blaikie553eb4a2014-06-06 22:16:56 +0000274}
275
276; Function Attrs: nounwind uwtable
Peter Collingbourned4bff302015-11-05 22:03:56 +0000277define i32* @_Z2f3v() #0 !dbg !26 {
David Blaikie553eb4a2014-06-06 22:16:56 +0000278entry:
David Blaikie877354a2015-04-14 18:08:25 +0000279 ret i32* @_ZZ2f3vE1z, !dbg !61
David Blaikie553eb4a2014-06-06 22:16:56 +0000280}
281
282; Function Attrs: nounwind uwtable
Peter Collingbourned4bff302015-11-05 22:03:56 +0000283define i32 @_Z2f7v() #0 !dbg !30 {
David Blaikie553eb4a2014-06-06 22:16:56 +0000284entry:
David Blaikie877354a2015-04-14 18:08:25 +0000285 %0 = load i32, i32* @_ZN12_GLOBAL__N_11iE, align 4, !dbg !62
286 %call = call i32* @_Z2f3v(), !dbg !62
287 %1 = load i32, i32* %call, align 4, !dbg !62
288 %add = add nsw i32 %0, %1, !dbg !62
289 %2 = load i32, i32* @_ZN12_GLOBAL__N_15inner1bE, align 4, !dbg !62
290 %add1 = add nsw i32 %add, %2, !dbg !62
291 %3 = load i32, i32* @_ZN5outer12_GLOBAL__N_11cE, align 4, !dbg !62
292 %add2 = add nsw i32 %add1, %3, !dbg !62
293 ret i32 %add2, !dbg !62
Eric Christopherdd1a0122013-09-13 00:35:05 +0000294}
295
David Blaikie5f7095e2015-04-14 17:17:04 +0000296attributes #0 = { nounwind 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" "target-cpu"="x86-64" "unsafe-fp-math"="false" "use-soft-float"="false" }
Eric Christopherdd1a0122013-09-13 00:35:05 +0000297attributes #1 = { nounwind readnone }
298
299!llvm.dbg.cu = !{!0}
David Blaikie877354a2015-04-14 18:08:25 +0000300!llvm.module.flags = !{!48, !49}
301!llvm.ident = !{!50}
Eric Christopherdd1a0122013-09-13 00:35:05 +0000302
Adrian Prantl75819ae2016-04-15 15:57:41 +0000303!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.7.0 (trunk 234897) (llvm/trunk 234911)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, globals: !31, imports: !44)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000304!1 = !DIFile(filename: "gnu-public-names.cpp", directory: "/tmp/dbginfo")
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000305!2 = !{}
306!3 = !{!4, !15}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000307!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", file: !1, line: 1, size: 8, align: 8, elements: !5, identifier: "_ZTS1C")
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000308!5 = !{!6, !8, !12}
Duncan P. N. Exon Smitha59d3e52016-04-23 21:08:00 +0000309!6 = !DIDerivedType(tag: DW_TAG_member, name: "static_member_variable", scope: !4, file: !1, line: 4, baseType: !7, flags: DIFlagStaticMember)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000310!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
Duncan P. N. Exon Smitha59d3e52016-04-23 21:08:00 +0000311!8 = !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !4, file: !1, line: 2, type: !9, isLocal: false, isDefinition: false, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000312!9 = !DISubroutineType(types: !10)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000313!10 = !{null, !11}
Duncan P. N. Exon Smitha59d3e52016-04-23 21:08:00 +0000314!11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
315!12 = !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !4, file: !1, line: 3, type: !13, isLocal: false, isDefinition: false, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000316!13 = !DISubroutineType(types: !14)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000317!14 = !{!7}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000318!15 = !DICompositeType(tag: DW_TAG_structure_type, name: "D", scope: !16, file: !1, line: 29, size: 32, align: 32, elements: !17, identifier: "_ZTSN2ns1DE")
319!16 = !DINamespace(name: "ns", scope: null, file: !1, line: 23)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +0000320!17 = !{!18}
Duncan P. N. Exon Smitha59d3e52016-04-23 21:08:00 +0000321!18 = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !15, file: !1, line: 30, baseType: !7, size: 32, align: 32)
322!20 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !4, file: !1, line: 9, type: !9, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !8, variables: !2)
323!21 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !4, file: !1, line: 13, type: !13, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !12, variables: !2)
Adrian Prantl75819ae2016-04-15 15:57:41 +0000324!22 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", scope: !1, file: !1, line: 19, type: !13, isLocal: false, isDefinition: true, scopeLine: 19, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
325!23 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", scope: !16, file: !1, line: 24, type: !24, isLocal: false, isDefinition: true, scopeLine: 24, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000326!24 = !DISubroutineType(types: !25)
David Blaikie5f7095e2015-04-14 17:17:04 +0000327!25 = !{null}
Adrian Prantl75819ae2016-04-15 15:57:41 +0000328!26 = distinct !DISubprogram(name: "f3", linkageName: "_Z2f3v", scope: !1, file: !1, line: 40, type: !27, isLocal: false, isDefinition: true, scopeLine: 40, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000329!27 = !DISubroutineType(types: !28)
David Blaikie5f7095e2015-04-14 17:17:04 +0000330!28 = !{!29}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000331!29 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64, align: 64)
Adrian Prantl75819ae2016-04-15 15:57:41 +0000332!30 = distinct !DISubprogram(name: "f7", linkageName: "_Z2f7v", scope: !1, file: !1, line: 57, type: !13, isLocal: false, isDefinition: true, scopeLine: 57, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
David Blaikie5f7095e2015-04-14 17:17:04 +0000333!31 = !{!32, !33, !34, !35, !36, !37, !39, !41}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000334!32 = !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", scope: !0, file: !1, line: 7, type: !7, isLocal: false, isDefinition: true, variable: i32* @_ZN1C22static_member_variableE, declaration: !6)
Duncan P. N. Exon Smitha59d3e52016-04-23 21:08:00 +0000335!33 = !DIGlobalVariable(name: "global_variable", scope: !0, file: !1, line: 17, type: !4, isLocal: false, isDefinition: true, variable: %struct.C* @global_variable)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000336!34 = !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", scope: !16, file: !1, line: 27, type: !7, isLocal: false, isDefinition: true, variable: i32* @_ZN2ns25global_namespace_variableE)
Duncan P. N. Exon Smitha59d3e52016-04-23 21:08:00 +0000337!35 = !DIGlobalVariable(name: "d", linkageName: "_ZN2ns1dE", scope: !16, file: !1, line: 31, type: !15, isLocal: false, isDefinition: true, variable: %"struct.ns::D"* @_ZN2ns1dE)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000338!36 = !DIGlobalVariable(name: "z", scope: !26, file: !1, line: 41, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZZ2f3vE1z)
339!37 = !DIGlobalVariable(name: "i", linkageName: "_ZN12_GLOBAL__N_11iE", scope: !38, file: !1, line: 37, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZN12_GLOBAL__N_11iE)
340!38 = !DINamespace(scope: null, file: !1, line: 36)
341!39 = !DIGlobalVariable(name: "b", linkageName: "_ZN12_GLOBAL__N_15inner1bE", scope: !40, file: !1, line: 47, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZN12_GLOBAL__N_15inner1bE)
342!40 = !DINamespace(name: "inner", scope: !38, file: !1, line: 46)
343!41 = !DIGlobalVariable(name: "c", linkageName: "_ZN5outer12_GLOBAL__N_11cE", scope: !42, file: !1, line: 53, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZN5outer12_GLOBAL__N_11cE)
344!42 = !DINamespace(scope: !43, file: !1, line: 52)
345!43 = !DINamespace(name: "outer", scope: null, file: !1, line: 51)
David Blaikie877354a2015-04-14 18:08:25 +0000346!44 = !{!45, !47}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000347!45 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !0, entity: !46, line: 34)
348!46 = !DIGlobalVariable(name: "global_namespace_variable_decl", linkageName: "_ZN2ns30global_namespace_variable_declE", scope: !16, file: !1, line: 28, type: !7, isLocal: false, isDefinition: false)
349!47 = !DIImportedEntity(tag: DW_TAG_imported_module, scope: !43, entity: !42, line: 43)
David Blaikie877354a2015-04-14 18:08:25 +0000350!48 = !{i32 2, !"Dwarf Version", i32 4}
351!49 = !{i32 2, !"Debug Info Version", i32 3}
352!50 = !{!"clang version 3.7.0 (trunk 234897) (llvm/trunk 234911)"}
Duncan P. N. Exon Smithed013cd2015-07-31 18:58:39 +0000353!51 = !DILocalVariable(name: "this", arg: 1, scope: !20, type: !52, flags: DIFlagArtificial | DIFlagObjectPointer)
Duncan P. N. Exon Smitha59d3e52016-04-23 21:08:00 +0000354!52 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +0000355!53 = !DIExpression()
356!54 = !DILocation(line: 0, scope: !20)
357!55 = !DILocation(line: 10, scope: !20)
358!56 = !DILocation(line: 11, scope: !20)
359!57 = !DILocation(line: 14, scope: !21)
360!58 = !DILocation(line: 20, scope: !22)
361!59 = !DILocation(line: 25, scope: !23)
362!60 = !DILocation(line: 26, scope: !23)
363!61 = !DILocation(line: 42, scope: !26)
364!62 = !DILocation(line: 58, scope: !30)