Teresa Johnson | c3c982a | 2016-01-07 00:06:27 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as %s -o %t.bc |
| 2 | ; RUN: llvm-as %p/Inputs/pr26037.ll -o %t2.bc |
| 3 | ; RUN: llvm-link -S -only-needed %t2.bc %t.bc | FileCheck %s |
| 4 | |
Adrian Prantl | 4eeaa0d | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 5 | ; CHECK: !DIImportedEntity({{.*}}, scope: ![[B:[0-9]+]], entity: ![[A:[0-9]+]] |
| 6 | ; CHECK: ![[B]] = distinct !DISubprogram(name: "b" |
| 7 | ; CHECK: ![[A]] = distinct !DISubprogram(name: "a" |
| 8 | ; CHECK: !DIImportedEntity({{.*}}, scope: ![[LBC:[0-9]+]], entity: ![[LBD:[0-9]+]] |
| 9 | ; CHECK: ![[LBC]] = distinct !DILexicalBlock(scope: ![[C:[0-9]+]] |
| 10 | ; CHECK: ![[C]] = distinct !DISubprogram(name: "c" |
| 11 | ; CHECK: ![[LBD]] = distinct !DILexicalBlock(scope: ![[D:[0-9]+]] |
| 12 | ; CHECK: ![[D]] = distinct !DISubprogram(name: "d" |
Teresa Johnson | c3c982a | 2016-01-07 00:06:27 +0000 | [diff] [blame] | 13 | |
| 14 | define void @_ZN1A1aEv() #0 !dbg !4 { |
| 15 | entry: |
Ahmed Bougacha | b472064 | 2016-01-07 03:14:59 +0000 | [diff] [blame] | 16 | ret void, !dbg !14 |
| 17 | } |
| 18 | |
| 19 | define void @_ZN1A1bEv() #0 !dbg !8 { |
| 20 | entry: |
| 21 | ret void, !dbg !15 |
Teresa Johnson | c3c982a | 2016-01-07 00:06:27 +0000 | [diff] [blame] | 22 | } |
| 23 | |
Teresa Johnson | 63ac4d7 | 2016-01-25 21:29:55 +0000 | [diff] [blame] | 24 | define void @_ZN1A1cEv() #0 !dbg !18 { |
| 25 | entry: |
| 26 | ret void, !dbg !21 |
| 27 | } |
| 28 | |
| 29 | define void @_ZN1A1dEv() #0 !dbg !20 { |
| 30 | entry: |
| 31 | ret void, !dbg !22 |
| 32 | } |
| 33 | |
Teresa Johnson | c3c982a | 2016-01-07 00:06:27 +0000 | [diff] [blame] | 34 | !llvm.dbg.cu = !{!0} |
Ahmed Bougacha | b472064 | 2016-01-07 03:14:59 +0000 | [diff] [blame] | 35 | !llvm.module.flags = !{!11, !12} |
| 36 | !llvm.ident = !{!13} |
Teresa Johnson | c3c982a | 2016-01-07 00:06:27 +0000 | [diff] [blame] | 37 | |
Adrian Prantl | 4eeaa0d | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 38 | !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 256934) (llvm/trunk 256936)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, imports: !9) |
Teresa Johnson | c3c982a | 2016-01-07 00:06:27 +0000 | [diff] [blame] | 39 | !1 = !DIFile(filename: "a2.cc", directory: "") |
| 40 | !2 = !{} |
Shiva Chen | a8a13bc | 2018-05-09 02:40:45 +0000 | [diff] [blame] | 41 | !4 = distinct !DISubprogram(name: "a", linkageName: "_ZN1A1aEv", scope: !5, file: !1, line: 7, type: !6, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2) |
Adrian Prantl | 841400b | 2017-04-28 22:25:46 +0000 | [diff] [blame] | 42 | !5 = !DINamespace(name: "A", scope: null) |
Teresa Johnson | c3c982a | 2016-01-07 00:06:27 +0000 | [diff] [blame] | 43 | !6 = !DISubroutineType(types: !7) |
| 44 | !7 = !{null} |
Shiva Chen | a8a13bc | 2018-05-09 02:40:45 +0000 | [diff] [blame] | 45 | !8 = distinct !DISubprogram(name: "b", linkageName: "_ZN1A1bEv", scope: !5, file: !1, line: 8, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2) |
Teresa Johnson | 63ac4d7 | 2016-01-25 21:29:55 +0000 | [diff] [blame] | 46 | !9 = !{!10, !16} |
Adrian Prantl | 9563b5a | 2017-07-19 00:09:54 +0000 | [diff] [blame] | 47 | !10 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !4, file: !1, line: 8) |
Ahmed Bougacha | b472064 | 2016-01-07 03:14:59 +0000 | [diff] [blame] | 48 | !11 = !{i32 2, !"Dwarf Version", i32 4} |
| 49 | !12 = !{i32 2, !"Debug Info Version", i32 3} |
| 50 | !13 = !{!"clang version 3.8.0 (trunk 256934) (llvm/trunk 256936)"} |
| 51 | !14 = !DILocation(line: 7, column: 12, scope: !4) |
| 52 | !15 = !DILocation(line: 8, column: 24, scope: !8) |
Adrian Prantl | 9563b5a | 2017-07-19 00:09:54 +0000 | [diff] [blame] | 53 | !16 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !17, entity: !19, file: !1, line: 8) |
Teresa Johnson | 63ac4d7 | 2016-01-25 21:29:55 +0000 | [diff] [blame] | 54 | !17 = distinct !DILexicalBlock(scope: !18, file: !1, line: 9, column: 8) |
Shiva Chen | a8a13bc | 2018-05-09 02:40:45 +0000 | [diff] [blame] | 55 | !18 = distinct !DISubprogram(name: "c", linkageName: "_ZN1A1cEv", scope: !5, file: !1, line: 9, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2) |
Teresa Johnson | 63ac4d7 | 2016-01-25 21:29:55 +0000 | [diff] [blame] | 56 | !19 = distinct !DILexicalBlock(scope: !20, file: !1, line: 10, column: 8) |
Shiva Chen | a8a13bc | 2018-05-09 02:40:45 +0000 | [diff] [blame] | 57 | !20 = distinct !DISubprogram(name: "d", linkageName: "_ZN1A1dEv", scope: !5, file: !1, line: 10, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2) |
Teresa Johnson | 63ac4d7 | 2016-01-25 21:29:55 +0000 | [diff] [blame] | 58 | !21 = !DILocation(line: 9, column: 8, scope: !18) |
| 59 | !22 = !DILocation(line: 10, column: 8, scope: !20) |