llvm.org GIT mirror llvm / 55019e5
DebugInfo: Include enumerators in pubnames This is consistent with GCC's behavior (which is the defacto standard for pubnames). Though I find the presence of enumerators from enum classes to be a bit confusing, possibly a bug on GCC's end (since they can't be named unqualified, unlike the other names - and names nested in classes don't go in pubnames, for instance - presumably because one must name the class first & that's enough to limit the scope of the search) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363349 91177308-0d34-0410-b5e6-96231b3b80d8 David Blaikie 3 months ago
2 changed file(s) with 242 addition(s) and 165 deletion(s). Raw diff Collapse all Expand all
13921392 addFlag(Buffer, dwarf::DW_AT_enum_class);
13931393 }
13941394
1395 auto *Context = CTy->getScope();
1396 bool IndexEnumerators = !Context || isa(Context) || isa(Context) ||
1397 isa(Context) || isa(Context);
13951398 DINodeArray Elements = CTy->getElements();
13961399
13971400 // Add enumerators to enumeration type.
14031406 addString(Enumerator, dwarf::DW_AT_name, Name);
14041407 auto Value = static_cast(Enum->getValue());
14051408 addConstantValue(Enumerator, IsUnsigned, Value);
1409 if (IndexEnumerators)
1410 addGlobalName(Name, Enumerator, Context);
14061411 }
14071412 }
14081413 }
8080 ; CHECK-NEXT: DW_AT_specification {{.*}} "static_member_variable"
8181
8282 ; CHECK: [[C:0x[0-9a-f]+]]: DW_TAG_structure_type
83 ; CHECK-NEXT: DW_AT_name {{.*}} "C"
83 ; CHECK-NOT: {{DW_TAG|NULL}}
84 ; CHECK: DW_AT_name {{.*}} "C"
8485
8586 ; CHECK: DW_TAG_member
86 ; CHECK-NEXT: DW_AT_name {{.*}} "static_member_variable"
87 ; CHECK-NOT: {{DW_TAG|NULL}}
88 ; CHECK: DW_AT_name {{.*}} "static_member_variable"
8789
8890 ; CHECK: DW_TAG_subprogram
89 ; CHECK-NEXT: DW_AT_linkage_name
90 ; CHECK-NEXT: DW_AT_name {{.*}} "member_function"
91 ; CHECK-NOT: {{DW_TAG|NULL}}
92 ; CHECK: DW_AT_linkage_name
93 ; CHECK-NOT: {{DW_TAG|NULL}}
94 ; CHECK: DW_AT_name {{.*}} "member_function"
9195
9296 ; CHECK: DW_TAG_subprogram
93 ; CHECK-NEXT: DW_AT_linkage_name
94 ; CHECK-NEXT: DW_AT_name {{.*}} "static_member_function"
97 ; CHECK-NOT: {{DW_TAG|NULL}}
98 ; CHECK: DW_AT_linkage_name
99 ; CHECK-NOT: {{DW_TAG|NULL}}
100 ; CHECK: DW_AT_name {{.*}} "static_member_function"
95101
96102 ; CHECK: [[INT:0x[0-9a-f]+]]: DW_TAG_base_type
97 ; CHECK-NEXT: DW_AT_name {{.*}} "int"
103 ; CHECK-NOT: {{DW_TAG|NULL}}
104 ; CHECK: DW_AT_name {{.*}} "int"
98105
99106 ; CHECK: [[GLOB_VAR:0x[0-9a-f]+]]: DW_TAG_variable
100 ; CHECK-NEXT: DW_AT_name {{.*}} "global_variable"
107 ; CHECK-NOT: {{DW_TAG|NULL}}
108 ; CHECK: DW_AT_name {{.*}} "global_variable"
101109
102110 ; CHECK: [[NS:0x[0-9a-f]+]]: DW_TAG_namespace
103 ; CHECK-NEXT: DW_AT_name {{.*}} "ns"
111 ; CHECK-NOT: {{DW_TAG|NULL}}
112 ; CHECK: DW_AT_name {{.*}} "ns"
104113
105114 ; CHECK: [[GLOB_NS_VAR:0x[0-9a-f]+]]: DW_TAG_variable
106 ; CHECK-NEXT: DW_AT_name {{.*}} "global_namespace_variable"
115 ; CHECK-NOT: {{DW_TAG|NULL|DW_AT_specification}}
116 ; CHECK: DW_AT_name {{.*}} "global_namespace_variable"
117 ; CHECK-NOT: {{DW_TAG|NULL|DW_AT_specification}}
107118 ; CHECK-NOT: DW_AT_specification
108119 ; CHECK: DW_AT_location
109120 ; CHECK-NOT: DW_AT_specification
110121
111122 ; CHECK: [[D_VAR:0x[0-9a-f]+]]: DW_TAG_variable
112 ; CHECK-NEXT: DW_AT_name {{.*}} "d"
113 ; CHECK-NOT: DW_AT_specification
123 ; CHECK-NOT: {{DW_TAG|NULL}}
124 ; CHECK: DW_AT_name {{.*}} "d"
125 ; CHECK-NOT: {{DW_TAG|NULL|DW_AT_specification}}
114126 ; CHECK: DW_AT_location
115127 ; CHECK-NOT: DW_AT_specification
116128
117129 ; CHECK: [[D:0x[0-9a-f]+]]: DW_TAG_structure_type
118 ; CHECK-NEXT: DW_AT_name {{.*}} "D"
130 ; CHECK-NOT: {{DW_TAG|NULL}}
131 ; CHECK: DW_AT_name {{.*}} "D"
119132
120133 ; CHECK: [[GLOB_NS_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
121 ; CHECK-NOT: DW_TAG
134 ; CHECK-NOT: {{DW_TAG|NULL}}
122135 ; CHECK: DW_AT_linkage_name
123 ; CHECK-NOT: DW_TAG
136 ; CHECK-NOT: {{DW_TAG|NULL}}
124137 ; CHECK: DW_AT_name {{.*}} "global_namespace_function"
125138
126139 ; CHECK: DW_TAG_subprogram
127 ; CHECK-NOT: DW_TAG
140 ; CHECK-NOT: {{DW_TAG|NULL}}
128141 ; CHECK: DW_AT_name {{.*}} "f3"
129142 ; CHECK-NOT: {{DW_TAG|NULL}}
130143 ; CHECK: [[F3_Z:.*]]: DW_TAG_variable
139152 ; CHECK: [[ANON:.*]]: DW_TAG_namespace
140153 ; CHECK-NOT: DW_AT_name
141154 ; CHECK: [[ANON_I:.*]]: DW_TAG_variable
142 ; CHECK-NOT: DW_TAG
155 ; CHECK-NOT: {{DW_TAG|NULL}}
143156 ; CHECK: DW_AT_name {{.*}} "i"
144157 ; CHECK-NOT: {{DW_TAG|NULL}}
145158 ; CHECK: [[ANON_INNER:.*]]: DW_TAG_namespace
156169 ; CHECK-NOT: {{DW_TAG|NULL}}
157170
158171 ; CHECK: [[OUTER:.*]]: DW_TAG_namespace
159 ; CHECK-NOT: DW_TAG
172 ; CHECK-NOT: {{DW_TAG|NULL}}
160173 ; CHECK: DW_AT_name {{.*}} "outer"
161174 ; CHECK-NOT: {{DW_TAG|NULL}}
162175 ; CHECK: [[OUTER_ANON:.*]]: DW_TAG_namespace
168181 ; CHECK-NOT: {{DW_TAG|NULL}}
169182 ; CHECK: NULL
170183 ; CHECK-NOT: {{DW_TAG|NULL}}
171 ; FIXME: We probably shouldn't bother describing the implicit
172 ; import of the preceding anonymous namespace. This should be fixed
173 ; in clang.
174 ; CHECK: DW_TAG_imported_module
175 ; CHECK-NOT: {{DW_TAG|NULL}}
176 ; CHECK: NULL
184 ; CHECK: NULL
185 ; CHECK-NOT: {{DW_TAG|NULL}}
186
187 ; CHECK: DW_TAG_enumeration
188 ; CHECK-NOT: {{DW_AT_name|DW_TAG|NULL}}
189 ; CHECK: [[UNNAMED_ENUM_ENUMERATOR:0x[0-9a-f]+]]: DW_TAG_enumerator
190 ; CHECK-NOT: {{DW_TAG|NULL}}
191 ; CHECK: DW_AT_name {{.*}} "unnamed_enum_enumerator"
192 ; CHECK-NOT: {{DW_TAG|NULL}}
193 ; CHECK: NULL
194 ; CHECK-NOT: {{DW_TAG|NULL}}
195
196 ; CHECK: [[UNSIGNED_INT:0x[0-9a-f]+]]: DW_TAG_base_type
197 ; CHECK-NOT: {{DW_TAG|NULL}}
198 ; CHECK: DW_AT_name {{.*}} "unsigned int"
199 ; CHECK-NOT: {{DW_TAG|NULL}}
200
201 ; CHECK: [[NAMED_ENUM:0x[0-9a-f]+]]: DW_TAG_enumeration
202 ; CHECK-NOT: {{DW_TAG|NULL}}
203 ; CHECK: DW_AT_name {{.*}} "named_enum"
204 ; CHECK-NOT: {{DW_TAG|NULL}}
205 ; CHECK: [[NAMED_ENUM_ENUMERATOR:0x[0-9a-f]+]]: DW_TAG_enumerator
206 ; CHECK-NOT: {{DW_TAG|NULL}}
207 ; CHECK: DW_AT_name {{.*}} "named_enum_enumerator"
208 ; CHECK-NOT: {{DW_TAG|NULL}}
209 ; CHECK: NULL
210 ; CHECK-NOT: {{DW_TAG|NULL}}
211
212 ; CHECK: [[NAMED_ENUM_CLASS:0x[0-9a-f]+]]: DW_TAG_enumeration
213 ; CHECK-NOT: {{DW_TAG|NULL}}
214 ; CHECK: DW_AT_name {{.*}} "named_enum_class"
215 ; CHECK-NOT: {{DW_TAG|NULL}}
216 ; CHECK: [[NAMED_ENUM_CLASS_ENUMERATOR:0x[0-9a-f]+]]: DW_TAG_enumerator
217 ; CHECK-NOT: {{DW_TAG|NULL}}
218 ; CHECK: DW_AT_name {{.*}} "named_enum_class_enumerator"
219 ; CHECK-NOT: {{DW_TAG|NULL}}
220 ; CHECK: NULL
177221 ; CHECK-NOT: {{DW_TAG|NULL}}
178222
179223 ; CHECK: DW_TAG_imported_declaration
180224 ; CHECK-NOT: {{DW_TAG|NULL}}
181225
182226 ; CHECK: [[MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
183 ; CHECK-NOT: DW_TAG
227 ; CHECK-NOT: {{DW_TAG|NULL}}
184228 ; CHECK: DW_AT_specification {{.*}} "_ZN1C15member_functionEv"
185229
186230 ; CHECK: [[STATIC_MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
187 ; CHECK-NOT: DW_TAG
231 ; CHECK-NOT: {{DW_TAG|NULL}}
188232 ; CHECK: DW_AT_specification {{.*}} "_ZN1C22static_member_functionEv"
189233
190234 ; CHECK: [[GLOBAL_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram
191 ; CHECK-NOT: DW_TAG
235 ; CHECK-NOT: {{DW_TAG|NULL}}
192236 ; CHECK: DW_AT_linkage_name
193 ; CHECK-NOT: DW_TAG
237 ; CHECK-NOT: {{DW_TAG|NULL}}
194238 ; CHECK: DW_AT_name {{.*}} "global_function"
195239
196240 ; CHECK-LABEL: .debug_gnu_pubnames contents:
200244 ; CHECK-NEXT: [[NS]] EXTERNAL TYPE "ns"
201245 ; CHECK-NEXT: [[OUTER_ANON_C]] STATIC VARIABLE "outer::(anonymous namespace)::c"
202246 ; CHECK-NEXT: [[ANON_I]] STATIC VARIABLE "(anonymous namespace)::i"
247 ; CHECK-NEXT: [[GLOB_NS_FUNC]] EXTERNAL FUNCTION "ns::global_namespace_function"
203248 ; GCC Doesn't put local statics in pubnames, but it seems not unreasonable and
204249 ; comes out naturally from LLVM's implementation, so I'm OK with it for now. If
205250 ; it's demonstrated that this is a major size concern or degrades debug info
209254 ; CHECK-NEXT: [[OUTER_ANON]] EXTERNAL TYPE "outer::(anonymous namespace)"
210255 ; CHECK-NEXT: [[ANON_INNER_B]] STATIC VARIABLE "(anonymous namespace)::inner::b"
211256 ; CHECK-NEXT: [[OUTER]] EXTERNAL TYPE "outer"
257 ; FIXME: GCC produces enumerators as EXTERNAL, not STATIC
258 ; CHECK-NEXT: [[NAMED_ENUM_CLASS_ENUMERATOR]] STATIC VARIABLE "named_enum_class_enumerator"
212259 ; CHECK-NEXT: [[MEM_FUNC]] EXTERNAL FUNCTION "C::member_function"
213260 ; CHECK-NEXT: [[GLOB_VAR]] EXTERNAL VARIABLE "global_variable"
214261 ; CHECK-NEXT: [[GLOB_NS_VAR]] EXTERNAL VARIABLE "ns::global_namespace_variable"
215262 ; CHECK-NEXT: [[ANON_INNER]] EXTERNAL TYPE "(anonymous namespace)::inner"
216263 ; CHECK-NEXT: [[D_VAR]] EXTERNAL VARIABLE "ns::d"
217 ; CHECK-NEXT: [[GLOB_NS_FUNC]] EXTERNAL FUNCTION "ns::global_namespace_function"
264 ; CHECK-NEXT: [[NAMED_ENUM_ENUMERATOR]] STATIC VARIABLE "named_enum_enumerator"
218265 ; CHECK-NEXT: [[STATIC_MEM_VAR]] EXTERNAL VARIABLE "C::static_member_variable"
219266 ; CHECK-NEXT: [[STATIC_MEM_FUNC]] EXTERNAL FUNCTION "C::static_member_function"
267 ; CHECK-NEXT: [[UNNAMED_ENUM_ENUMERATOR]] STATIC VARIABLE "unnamed_enum_enumerator"
220268
221269 ; CHECK-LABEL: debug_gnu_pubtypes contents:
222270 ; CHECK: Offset Linkage Kind Name
223 ; CHECK-DAG: [[C]] EXTERNAL TYPE "C"
224 ; CHECK-DAG: [[D]] EXTERNAL TYPE "ns::D"
225 ; CHECK-DAG: [[INT]] STATIC TYPE "int"
226
227 source_filename = "test/DebugInfo/X86/gnu-public-names.ll"
271 ; CHECK-NEXT: [[C]] EXTERNAL TYPE "C"
272 ; CHECK-NEXT: [[UNSIGNED_INT]] STATIC TYPE "unsigned int"
273 ; CHECK-NEXT: [[D]] EXTERNAL TYPE "ns::D"
274 ; CHECK-NEXT: [[NAMED_ENUM]] EXTERNAL TYPE "named_enum"
275 ; CHECK-NEXT: [[INT]] STATIC TYPE "int"
276 ; CHECK-NEXT: [[NAMED_ENUM_CLASS]] EXTERNAL TYPE "named_enum_class"
228277
229278 %struct.C = type { i8 }
230279 %"struct.ns::D" = type { i32 }
231280
232 @_ZN1C22static_member_variableE = global i32 0, align 4, !dbg !0
233 @global_variable = global %struct.C zeroinitializer, align 1, !dbg !22
234 @_ZN2ns25global_namespace_variableE = global i32 1, align 4, !dbg !24
235 @_ZN2ns1dE = global %"struct.ns::D" zeroinitializer, align 4, !dbg !26
236 @_ZZ2f3vE1z = internal global i32 0, align 4, !dbg !28
237 @_ZN12_GLOBAL__N_11iE = internal global i32 0, align 4, !dbg !34
238 @_ZN12_GLOBAL__N_15inner1bE = internal global i32 0, align 4, !dbg !37
239 @_ZN5outer12_GLOBAL__N_11cE = internal global i32 0, align 4, !dbg !40
240
241 ; Function Attrs: nounwind uwtable
242 define void @_ZN1C15member_functionEv(%struct.C* %this) #0 align 2 !dbg !51 {
281 @_ZN1C22static_member_variableE = dso_local global i32 0, align 4, !dbg !0
282 @global_variable = dso_local global %struct.C zeroinitializer, align 1, !dbg !18
283 @_ZN2ns25global_namespace_variableE = dso_local global i32 1, align 4, !dbg !29
284 @_ZN2ns1dE = dso_local global %"struct.ns::D" zeroinitializer, align 4, !dbg !32
285 @_ZZ2f3vE1z = internal global i32 0, align 4, !dbg !37
286 @_ZN12_GLOBAL__N_11iE = internal global i32 0, align 4, !dbg !44
287 @_ZN12_GLOBAL__N_15inner1bE = internal global i32 0, align 4, !dbg !47
288 @_ZN5outer12_GLOBAL__N_11cE = internal global i32 0, align 4, !dbg !50
289
290 ; Function Attrs: noinline nounwind optnone uwtable
291 define dso_local void @_ZN1C15member_functionEv(%struct.C* %this) #0 align 2 !dbg !61 {
243292 entry:
244293 %this.addr = alloca %struct.C*, align 8
245294 store %struct.C* %this, %struct.C** %this.addr, align 8
246 call void @llvm.dbg.declare(metadata %struct.C** %this.addr, metadata !52, metadata !54), !dbg !55
247 %this1 = load %struct.C*, %struct.C** %this.addr
248 store i32 0, i32* @_ZN1C22static_member_variableE, align 4, !dbg !56
249 ret void, !dbg !57
250 }
251
252 ; Function Attrs: nounwind readnone
295 call void @llvm.dbg.declare(metadata %struct.C** %this.addr, metadata !62, metadata !DIExpression()), !dbg !64
296 %this1 = load %struct.C*, %struct.C** %this.addr, align 8
297 store i32 0, i32* @_ZN1C22static_member_variableE, align 4, !dbg !65
298 ret void, !dbg !66
299 }
300
301 ; Function Attrs: nounwind readnone speculatable
253302 declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
254303
255 ; Function Attrs: nounwind uwtable
256 define i32 @_ZN1C22static_member_functionEv() #0 align 2 !dbg !58 {
257 entry:
258 %0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !59
259 ret i32 %0, !dbg !59
260 }
261
262 ; Function Attrs: nounwind uwtable
263 define i32 @_Z15global_functionv() #0 !dbg !60 {
264 entry:
265 ret i32 -1, !dbg !61
266 }
267
268 ; Function Attrs: nounwind uwtable
269 define void @_ZN2ns25global_namespace_functionEv() #0 !dbg !62 {
270 entry:
271 call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !65
272 ret void, !dbg !66
273 }
274
275 ; Function Attrs: nounwind uwtable
276 define i32* @_Z2f3v() #0 !dbg !30 {
277 entry:
278 ret i32* @_ZZ2f3vE1z, !dbg !67
279 }
280
281 ; Function Attrs: nounwind uwtable
282 define i32 @_Z2f7v() #0 !dbg !68 {
283 entry:
284 %0 = load i32, i32* @_ZN12_GLOBAL__N_11iE, align 4, !dbg !69
285 %call = call i32* @_Z2f3v(), !dbg !69
286 %1 = load i32, i32* %call, align 4, !dbg !69
287 %add = add nsw i32 %0, %1, !dbg !69
288 %2 = load i32, i32* @_ZN12_GLOBAL__N_15inner1bE, align 4, !dbg !69
289 %add1 = add nsw i32 %add, %2, !dbg !69
290 %3 = load i32, i32* @_ZN5outer12_GLOBAL__N_11cE, align 4, !dbg !69
291 %add2 = add nsw i32 %add1, %3, !dbg !69
292 ret i32 %add2, !dbg !69
293 }
294
295 attributes #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" }
296 attributes #1 = { nounwind readnone }
304 ; Function Attrs: noinline nounwind optnone uwtable
305 define dso_local i32 @_ZN1C22static_member_functionEv() #0 align 2 !dbg !67 {
306 entry:
307 %0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !68
308 ret i32 %0, !dbg !69
309 }
310
311 ; Function Attrs: noinline nounwind optnone uwtable
312 define dso_local i32 @_Z15global_functionv() #0 !dbg !70 {
313 entry:
314 ret i32 -1, !dbg !71
315 }
316
317 ; Function Attrs: noinline nounwind optnone uwtable
318 define dso_local void @_ZN2ns25global_namespace_functionEv() #0 !dbg !72 {
319 entry:
320 call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !75
321 ret void, !dbg !76
322 }
323
324 ; Function Attrs: noinline nounwind optnone uwtable
325 define dso_local i32* @_Z2f3v() #0 !dbg !39 {
326 entry:
327 ret i32* @_ZZ2f3vE1z, !dbg !77
328 }
329
330 ; Function Attrs: noinline nounwind optnone uwtable
331 define dso_local i32 @_Z2f7v() #0 !dbg !78 {
332 entry:
333 %0 = load i32, i32* @_ZN12_GLOBAL__N_11iE, align 4, !dbg !79
334 %call = call i32* @_Z2f3v(), !dbg !80
335 %1 = load i32, i32* %call, align 4, !dbg !81
336 %add = add nsw i32 %0, %1, !dbg !82
337 %2 = load i32, i32* @_ZN12_GLOBAL__N_15inner1bE, align 4, !dbg !83
338 %add1 = add nsw i32 %add, %2, !dbg !84
339 %3 = load i32, i32* @_ZN5outer12_GLOBAL__N_11cE, align 4, !dbg !85
340 %add2 = add nsw i32 %add1, %3, !dbg !86
341 %add3 = add nsw i32 %add2, 0, !dbg !87
342 %add4 = add nsw i32 %add3, 0, !dbg !88
343 %add5 = add nsw i32 %add4, 0, !dbg !89
344 ret i32 %add5, !dbg !90
345 }
346
347 attributes #0 = { noinline nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
348 attributes #1 = { nounwind readnone speculatable }
297349
298350 !llvm.dbg.cu = !{!2}
299 !llvm.module.flags = !{!48, !49}
300 !llvm.ident = !{!50}
351 !llvm.module.flags = !{!57, !58, !59}
352 !llvm.ident = !{!60}
301353
302354 !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
303 !1 = !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", scope: !2, file: !3, line: 7, type: !9, isLocal: false, isDefinition: true, declaration: !8)
304 !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.7.0 (trunk 234897) (llvm/trunk 234911)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !5, globals: !21, imports: !44, nameTableKind: GNU)
305 !3 = !DIFile(filename: "gnu-public-names.cpp", directory: "/tmp/dbginfo")
306 !4 = !{}
307 !5 = !{!6, !17}
308 !6 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", file: !3, line: 1, size: 8, align: 8, elements: !7, identifier: "_ZTS1C")
309 !7 = !{!8, !10, !14}
310 !8 = !DIDerivedType(tag: DW_TAG_member, name: "static_member_variable", scope: !6, file: !3, line: 4, baseType: !9, flags: DIFlagStaticMember)
311 !9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
312 !10 = !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !6, file: !3, line: 2, type: !11, isLocal: false, isDefinition: false, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false)
313 !11 = !DISubroutineType(types: !12)
314 !12 = !{null, !13}
315 !13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
316 !14 = !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !6, file: !3, line: 3, type: !15, isLocal: false, isDefinition: false, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false)
317 !15 = !DISubroutineType(types: !16)
318 !16 = !{!9}
319 !17 = !DICompositeType(tag: DW_TAG_structure_type, name: "D", scope: !18, file: !3, line: 29, size: 32, align: 32, elements: !19, identifier: "_ZTSN2ns1DE")
320 !18 = !DINamespace(name: "ns", scope: null)
321 !19 = !{!20}
322 !20 = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !17, file: !3, line: 30, baseType: !9, size: 32, align: 32)
323 !21 = !{!0, !22, !24, !26, !28, !34, !37, !40}
324 !22 = !DIGlobalVariableExpression(var: !23, expr: !DIExpression())
325 !23 = !DIGlobalVariable(name: "global_variable", scope: !2, file: !3, line: 17, type: !6, isLocal: false, isDefinition: true)
326 !24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression())
327 !25 = !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", scope: !18, file: !3, line: 27, type: !9, isLocal: false, isDefinition: true)
328 !26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression())
329 !27 = !DIGlobalVariable(name: "d", linkageName: "_ZN2ns1dE", scope: !18, file: !3, line: 31, type: !17, isLocal: false, isDefinition: true)
330 !28 = !DIGlobalVariableExpression(var: !29, expr: !DIExpression())
331 !29 = !DIGlobalVariable(name: "z", scope: !30, file: !3, line: 41, type: !9, isLocal: true, isDefinition: true)
332 !30 = distinct !DISubprogram(name: "f3", linkageName: "_Z2f3v", scope: !3, file: !3, line: 40, type: !31, isLocal: false, isDefinition: true, scopeLine: 40, flags: DIFlagPrototyped, isOptimized: false, unit: !2, retainedNodes: !4)
333 !31 = !DISubroutineType(types: !32)
334 !32 = !{!33}
335 !33 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 64, align: 64)
336 !34 = !DIGlobalVariableExpression(var: !35, expr: !DIExpression())
337 !35 = !DIGlobalVariable(name: "i", linkageName: "_ZN12_GLOBAL__N_11iE", scope: !36, file: !3, line: 37, type: !9, isLocal: true, isDefinition: true)
338 !36 = !DINamespace(scope: null)
355 !1 = distinct !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", scope: !2, file: !3, line: 7, type: !13, isLocal: false, isDefinition: true, declaration: !22)
356 !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 9.0.0 (trunk 363288) (llvm/trunk 363294)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !16, globals: !17, imports: !54, nameTableKind: GNU)
357 !3 = !DIFile(filename: "names.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch")
358 !4 = !{!5, !9, !12}
359 !5 = !DICompositeType(tag: DW_TAG_enumeration_type, file: !3, line: 49, baseType: !6, size: 32, elements: !7)
360 !6 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
361 !7 = !{!8}
362 !8 = !DIEnumerator(name: "unnamed_enum_enumerator", value: 0, isUnsigned: true)
363 !9 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "named_enum", file: !3, line: 52, baseType: !6, size: 32, elements: !10, identifier: "_ZTS10named_enum")
364 !10 = !{!11}
365 !11 = !DIEnumerator(name: "named_enum_enumerator", value: 0, isUnsigned: true)
366 !12 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "named_enum_class", file: !3, line: 55, baseType: !13, size: 32, flags: DIFlagEnumClass, elements: !14, identifier: "_ZTS16named_enum_class")
367 !13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
368 !14 = !{!15}
369 !15 = !DIEnumerator(name: "named_enum_class_enumerator", value: 0)
370 !16 = !{!13}
371 !17 = !{!0, !18, !29, !32, !37, !44, !47, !50}
372 !18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression())
373 !19 = distinct !DIGlobalVariable(name: "global_variable", scope: !2, file: !3, line: 13, type: !20, isLocal: false, isDefinition: true)
374 !20 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "C", file: !3, line: 1, size: 8, flags: DIFlagTypePassByValue, elements: !21, identifier: "_ZTS1C")
375 !21 = !{!22, !23, !27}
376 !22 = !DIDerivedType(tag: DW_TAG_member, name: "static_member_variable", scope: !20, file: !3, line: 4, baseType: !13, flags: DIFlagStaticMember)
377 !23 = !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !20, file: !3, line: 2, type: !24, scopeLine: 2, flags: DIFlagPrototyped, spFlags: 0)
378 !24 = !DISubroutineType(types: !25)
379 !25 = !{null, !26}
380 !26 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !20, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
381 !27 = !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !20, file: !3, line: 3, type: !28, scopeLine: 3, flags: DIFlagPrototyped | DIFlagStaticMember, spFlags: 0)
382 !28 = !DISubroutineType(types: !16)
383 !29 = !DIGlobalVariableExpression(var: !30, expr: !DIExpression())
384 !30 = distinct !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", scope: !31, file: !3, line: 19, type: !13, isLocal: false, isDefinition: true)
385 !31 = !DINamespace(name: "ns", scope: null)
386 !32 = !DIGlobalVariableExpression(var: !33, expr: !DIExpression())
387 !33 = distinct !DIGlobalVariable(name: "d", linkageName: "_ZN2ns1dE", scope: !31, file: !3, line: 23, type: !34, isLocal: false, isDefinition: true)
388 !34 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "D", scope: !31, file: !3, line: 21, size: 32, flags: DIFlagTypePassByValue, elements: !35, identifier: "_ZTSN2ns1DE")
389 !35 = !{!36}
390 !36 = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !34, file: !3, line: 22, baseType: !13, size: 32)
339391 !37 = !DIGlobalVariableExpression(var: !38, expr: !DIExpression())
340 !38 = !DIGlobalVariable(name: "b", linkageName: "_ZN12_GLOBAL__N_15inner1bE", scope: !39, file: !3, line: 47, type: !9, isLocal: true, isDefinition: true)
341 !39 = !DINamespace(name: "inner", scope: !36)
342 !40 = !DIGlobalVariableExpression(var: !41, expr: !DIExpression())
343 !41 = !DIGlobalVariable(name: "c", linkageName: "_ZN5outer12_GLOBAL__N_11cE", scope: !42, file: !3, line: 53, type: !9, isLocal: true, isDefinition: true)
344 !42 = !DINamespace(scope: !43)
345 !43 = !DINamespace(name: "outer", scope: null)
346 !44 = !{!45, !47}
347 !45 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !46, file:!3, line: 34)
348 !46 = !DIGlobalVariable(name: "global_namespace_variable_decl", linkageName: "_ZN2ns30global_namespace_variable_declE", scope: !18, file: !3, line: 28, type: !9, isLocal: false, isDefinition: false)
349 !47 = !DIImportedEntity(tag: DW_TAG_imported_module, scope: !43, entity: !42, file: !3, line: 43)
350 !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)"}
353 !51 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !6, file: !3, line: 9, type: !11, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: false, unit: !2, declaration: !10, retainedNodes: !4)
354 !52 = !DILocalVariable(name: "this", arg: 1, scope: !51, type: !53, flags: DIFlagArtificial | DIFlagObjectPointer)
355 !53 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64, align: 64)
356 !54 = !DIExpression()
357 !55 = !DILocation(line: 0, scope: !51)
358 !56 = !DILocation(line: 10, scope: !51)
359 !57 = !DILocation(line: 11, scope: !51)
360 !58 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !6, file: !3, line: 13, type: !15, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: false, unit: !2, declaration: !14, retainedNodes: !4)
361 !59 = !DILocation(line: 14, scope: !58)
362 !60 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", scope: !3, file: !3, line: 19, type: !15, isLocal: false, isDefinition: true, scopeLine: 19, flags: DIFlagPrototyped, isOptimized: false, unit: !2, retainedNodes: !4)
363 !61 = !DILocation(line: 20, scope: !60)
364 !62 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", scope: !18, file: !3, line: 24, type: !63, isLocal: false, isDefinition: true, scopeLine: 24, flags: DIFlagPrototyped, isOptimized: false, unit: !2, retainedNodes: !4)
365 !63 = !DISubroutineType(types: !64)
366 !64 = !{null}
367 !65 = !DILocation(line: 25, scope: !62)
368 !66 = !DILocation(line: 26, scope: !62)
369 !67 = !DILocation(line: 42, scope: !30)
370 !68 = distinct !DISubprogram(name: "f7", linkageName: "_Z2f7v", scope: !3, file: !3, line: 57, type: !15, isLocal: false, isDefinition: true, scopeLine: 57, flags: DIFlagPrototyped, isOptimized: false, unit: !2, retainedNodes: !4)
371 !69 = !DILocation(line: 58, scope: !68)
372
392 !38 = distinct !DIGlobalVariable(name: "z", scope: !39, file: !3, line: 33, type: !13, isLocal: true, isDefinition: true)
393 !39 = distinct !DISubprogram(name: "f3", linkageName: "_Z2f3v", scope: !3, file: !3, line: 32, type: !40, scopeLine: 32, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43)
394 !40 = !DISubroutineType(types: !41)
395 !41 = !{!42}
396 !42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !13, size: 64)
397 !43 = !{}
398 !44 = !DIGlobalVariableExpression(var: !45, expr: !DIExpression())
399 !45 = distinct !DIGlobalVariable(name: "i", linkageName: "_ZN12_GLOBAL__N_11iE", scope: !46, file: !3, line: 29, type: !13, isLocal: true, isDefinition: true)
400 !46 = !DINamespace(scope: null)
401 !47 = !DIGlobalVariableExpression(var: !48, expr: !DIExpression())
402 !48 = distinct !DIGlobalVariable(name: "b", linkageName: "_ZN12_GLOBAL__N_15inner1bE", scope: !49, file: !3, line: 39, type: !13, isLocal: true, isDefinition: true)
403 !49 = !DINamespace(name: "inner", scope: !46)
404 !50 = !DIGlobalVariableExpression(var: !51, expr: !DIExpression())
405 !51 = distinct !DIGlobalVariable(name: "c", linkageName: "_ZN5outer12_GLOBAL__N_11cE", scope: !52, file: !3, line: 45, type: !13, isLocal: true, isDefinition: true)
406 !52 = !DINamespace(scope: !53)
407 !53 = !DINamespace(name: "outer", scope: null)
408 !54 = !{!55}
409 !55 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !56, file: !3, line: 26)
410 !56 = !DIGlobalVariable(name: "global_namespace_variable_decl", linkageName: "_ZN2ns30global_namespace_variable_declE", scope: !31, file: !3, line: 20, type: !13, isLocal: false, isDefinition: false)
411 !57 = !{i32 2, !"Dwarf Version", i32 4}
412 !58 = !{i32 2, !"Debug Info Version", i32 3}
413 !59 = !{i32 1, !"wchar_size", i32 4}
414 !60 = !{!"clang version 9.0.0 (trunk 363288) (llvm/trunk 363294)"}
415 !61 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !20, file: !3, line: 9, type: !24, scopeLine: 9, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, declaration: !23, retainedNodes: !43)
416 !62 = !DILocalVariable(name: "this", arg: 1, scope: !61, type: !63, flags: DIFlagArtificial | DIFlagObjectPointer)
417 !63 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !20, size: 64)
418 !64 = !DILocation(line: 0, scope: !61)
419 !65 = !DILocation(line: 9, column: 52, scope: !61)
420 !66 = !DILocation(line: 9, column: 57, scope: !61)
421 !67 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !20, file: !3, line: 11, type: !28, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, declaration: !27, retainedNodes: !43)
422 !68 = !DILocation(line: 11, column: 42, scope: !67)
423 !69 = !DILocation(line: 11, column: 35, scope: !67)
424 !70 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", scope: !3, file: !3, line: 15, type: !28, scopeLine: 15, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43)
425 !71 = !DILocation(line: 15, column: 25, scope: !70)
426 !72 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", scope: !31, file: !3, line: 18, type: !73, scopeLine: 18, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43)
427 !73 = !DISubroutineType(types: !74)
428 !74 = !{null}
429 !75 = !DILocation(line: 18, column: 52, scope: !72)
430 !76 = !DILocation(line: 18, column: 71, scope: !72)
431 !77 = !DILocation(line: 34, column: 3, scope: !39)
432 !78 = distinct !DISubprogram(name: "f7", linkageName: "_Z2f7v", scope: !3, file: !3, line: 58, type: !28, scopeLine: 58, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43)
433 !79 = !DILocation(line: 59, column: 10, scope: !78)
434 !80 = !DILocation(line: 59, column: 15, scope: !78)
435 !81 = !DILocation(line: 59, column: 14, scope: !78)
436 !82 = !DILocation(line: 59, column: 12, scope: !78)
437 !83 = !DILocation(line: 59, column: 22, scope: !78)
438 !84 = !DILocation(line: 59, column: 20, scope: !78)
439 !85 = !DILocation(line: 59, column: 33, scope: !78)
440 !86 = !DILocation(line: 59, column: 31, scope: !78)
441 !87 = !DILocation(line: 59, column: 42, scope: !78)
442 !88 = !DILocation(line: 59, column: 68, scope: !78)
443 !89 = !DILocation(line: 60, column: 32, scope: !78)
444 !90 = !DILocation(line: 59, column: 3, scope: !78)