Adrian Prantl | b20e492 | 2018-08-24 21:01:58 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as -disable-output %s -o - 2>&1 | FileCheck %s |
| 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.13.0" |
| 5 | |
| 6 | define void @f() !dbg !4 { |
| 7 | entry: |
| 8 | ; CHECK: scope must be a DILocalScope |
| 9 | ; CHECK: DILocation |
| 10 | ret void, !dbg !6 |
| 11 | } |
| 12 | |
| 13 | ; CHECK: warning: ignoring invalid debug info |
| 14 | |
| 15 | !llvm.dbg.cu = !{!0} |
| 16 | !llvm.module.flags = !{!2, !3} |
| 17 | |
| 18 | !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, emissionKind: FullDebug) |
| 19 | !1 = !DIFile(filename: "t.c", directory: "/tmp") |
| 20 | !2 = !{i32 2, !"Dwarf Version", i32 4} |
| 21 | !3 = !{i32 2, !"Debug Info Version", i32 3} |
| 22 | !4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 2, type: !5, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, unit: !0) |
| 23 | !5 = !DISubroutineType(types: !{}) |
| 24 | !6 = !DILocation(line: 2, scope: !1) |