Peter Collingbourne | b52e236 | 2017-09-12 21:50:41 +0000 | [diff] [blame] | 1 | ; RUN: llc -mtriple=x86_64-pc-linux-gnu -generate-type-units -filetype=obj < %s | llvm-dwarfdump -v - | FileCheck %s |
David Blaikie | a0e3c75 | 2017-02-03 00:44:18 +0000 | [diff] [blame] | 2 | |
| 3 | ; Generated from: |
| 4 | |
| 5 | ; namespace ns { |
| 6 | ; struct foo { |
| 7 | ; }; |
| 8 | ; } |
| 9 | ; struct bar { |
| 10 | ; ns::foo f; |
| 11 | ; }; |
| 12 | ; bar b; |
| 13 | |
| 14 | ; CHECK-LABEL: .debug_info contents: |
| 15 | ; CHECK: [[CU:0x[0-9a-f]+]]: DW_TAG_compile_unit |
| 16 | ; CHECK: [[BAR:0x[0-9a-f]+]]: DW_TAG_structure_type |
| 17 | |
| 18 | |
| 19 | ; CHECK-LABEL: .debug_gnu_pubnames contents: |
| 20 | ; CHECK-NEXT: length = {{.*}} version = 0x0002 unit_offset = 0x00000000 unit_size = {{.*}} |
| 21 | ; CHECK-NEXT: Offset Linkage Kind Name |
| 22 | ; CHECK-NEXT: [[CU]] EXTERNAL TYPE "ns" |
| 23 | ; CHECK-NEXT: {{.*}} EXTERNAL VARIABLE "b" |
| 24 | |
| 25 | ; CHECK-LABEL: debug_gnu_pubtypes contents: |
| 26 | ; CHECK-NEXT: length = {{.*}} version = 0x0002 unit_offset = 0x00000000 unit_size = {{.*}} |
| 27 | ; CHECK-NEXT: Offset Linkage Kind Name |
| 28 | ; CHECK-NEXT: [[BAR]] EXTERNAL TYPE "bar" |
| 29 | ; CHECK-NEXT: [[CU]] EXTERNAL TYPE "ns::foo" |
| 30 | |
| 31 | %struct.bar = type { %"struct.ns::foo" } |
| 32 | %"struct.ns::foo" = type { i8 } |
| 33 | |
| 34 | @b = global %struct.bar zeroinitializer, align 1, !dbg !0 |
| 35 | |
| 36 | !llvm.dbg.cu = !{!2} |
| 37 | !llvm.module.flags = !{!11, !12} |
| 38 | !llvm.ident = !{!13} |
| 39 | |
Adrian Prantl | 0578221 | 2017-08-30 18:06:51 +0000 | [diff] [blame] | 40 | !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) |
David Blaikie | a0e3c75 | 2017-02-03 00:44:18 +0000 | [diff] [blame] | 41 | !1 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !3, line: 8, type: !6, isLocal: false, isDefinition: true) |
Peter Collingbourne | b52e236 | 2017-09-12 21:50:41 +0000 | [diff] [blame] | 42 | !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 5.0.0 (trunk 293904) (llvm/trunk 293908)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, gnuPubnames: true) |
David Blaikie | a0e3c75 | 2017-02-03 00:44:18 +0000 | [diff] [blame] | 43 | !3 = !DIFile(filename: "type.cpp", directory: "/tmp/dbginfo") |
| 44 | !4 = !{} |
| 45 | !5 = !{!0} |
| 46 | !6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "bar", file: !3, line: 5, size: 8, elements: !7, identifier: "_ZTS3bar") |
| 47 | !7 = !{!8} |
| 48 | !8 = !DIDerivedType(tag: DW_TAG_member, name: "f", scope: !6, file: !3, line: 6, baseType: !9, size: 8) |
| 49 | !9 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "foo", scope: !10, file: !3, line: 2, size: 8, elements: !4, identifier: "_ZTSN2ns3fooE") |
Adrian Prantl | fed4f39 | 2017-04-28 22:25:46 +0000 | [diff] [blame] | 50 | !10 = !DINamespace(name: "ns", scope: null) |
David Blaikie | a0e3c75 | 2017-02-03 00:44:18 +0000 | [diff] [blame] | 51 | !11 = !{i32 2, !"Dwarf Version", i32 4} |
| 52 | !12 = !{i32 2, !"Debug Info Version", i32 3} |
| 53 | !13 = !{!"clang version 5.0.0 (trunk 293904) (llvm/trunk 293908)"} |
| 54 | |