Adrian Prantl | 733fe2f | 2017-10-02 18:31:29 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as -disable-output %s -o - 2>&1 | FileCheck %s |
Adrian Prantl | a2224c9 | 2017-08-23 21:52:24 +0000 | [diff] [blame] | 2 | source_filename = "t.c" |
| 3 | target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" |
| 4 | target triple = "x86_64-apple-macosx10.12.0" |
| 5 | |
| 6 | define void @f() !dbg !4 { |
| 7 | entry: |
| 8 | ; CHECK: scope points into the type hierarchy |
| 9 | ; CHECK: DILocation |
| 10 | ret void, !dbg !7 |
| 11 | } |
| 12 | |
| 13 | define void @g() !dbg !8 { |
| 14 | entry: |
| 15 | ; CHECK: scope points into the type hierarchy |
| 16 | ; CHECK: DILexicalBlockFile |
| 17 | ret void, !dbg !9 |
| 18 | } |
| 19 | |
Adrian Prantl | 733fe2f | 2017-10-02 18:31:29 +0000 | [diff] [blame] | 20 | ; CHECK: warning: ignoring invalid debug info |
| 21 | |
Adrian Prantl | a2224c9 | 2017-08-23 21:52:24 +0000 | [diff] [blame] | 22 | !llvm.dbg.cu = !{!0} |
| 23 | !llvm.module.flags = !{!2, !3} |
| 24 | |
| 25 | !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, emissionKind: FullDebug) |
| 26 | !1 = !DIFile(filename: "t.c", directory: "/tmp") |
| 27 | !2 = !{i32 2, !"Dwarf Version", i32 4} |
| 28 | !3 = !{i32 2, !"Debug Info Version", i32 3} |
| 29 | !4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 2, type: !5, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, unit: !0) |
| 30 | !5 = !DISubroutineType(types: !{}) |
| 31 | !6 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 2, type: !5, isDefinition: false, scopeLine: 2) |
| 32 | !7 = !DILocation(line: 2, scope: !6) |
| 33 | !8 = distinct !DISubprogram(name: "g", scope: !1, file: !1, line: 2, type: !5, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, unit: !0) |
| 34 | !9 = !DILocation(line: 2, scope: !10, inlinedAt: !11) |
| 35 | !10 = !DILexicalBlockFile(scope: !6, file: !2, discriminator: 0) |
| 36 | !11 = !DILocation(line: 2, scope: !8) |