Adrian Prantl | 5c83bed | 2020-03-02 09:39:27 -0800 | [diff] [blame] | 1 | ; RUN: llvm-as -disable-output <%s 2>&1| FileCheck %s |
| 2 | |
| 3 | define void @f() !dbg !14 { |
| 4 | ret void, !dbg !5 |
| 5 | } |
| 6 | |
| 7 | !llvm.module.flags = !{!15} |
| 8 | !llvm.dbg.cu = !{!4} |
| 9 | |
| 10 | !0 = !{null} |
| 11 | !1 = distinct !DICompositeType(tag: DW_TAG_structure_type) |
| 12 | !2 = !DIFile(filename: "f.c", directory: "/") |
| 13 | !3 = !DISubroutineType(types: !0) |
| 14 | !4 = distinct !DICompileUnit(language: DW_LANG_C, file: !2) |
| 15 | ; CHECK: !dbg attachment points at wrong subprogram for function |
| 16 | ; CHECK: warning: ignoring invalid debug info |
| 17 | !5 = !DILocation(line: 1, scope: !9) |
| 18 | !9 = distinct !DISubprogram(name: "f", scope: !1, |
| 19 | file: !2, line: 1, type: !3, isLocal: true, |
| 20 | isDefinition: true, scopeLine: 2, |
| 21 | unit: !4) |
| 22 | !14 = distinct !DISubprogram(name: "f", scope: !1, |
| 23 | file: !2, line: 1, type: !3, isLocal: true, |
| 24 | isDefinition: true, scopeLine: 2, |
| 25 | unit: !4) |
| 26 | !15 = !{i32 1, !"Debug Info Version", i32 3} |