Artem Belevich | a8455f2 | 2016-02-11 18:21:47 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -mtriple=nvptx64-nvidia-cuda | FileCheck %s |
| 2 | |
| 3 | ; // Bitcode int this test case is reduced version of compiled code below: |
| 4 | ;extern "C" { |
| 5 | ;#line 1 "/source/dir/foo.h" |
| 6 | ;__device__ void foo() {} |
| 7 | ;#line 2 "/source/dir/bar.cu" |
| 8 | ;__device__ void bar() {} |
| 9 | ;} |
| 10 | |
| 11 | ; CHECK: .file 1 "/source/dir/bar.cu" |
| 12 | ; CHECK: .file 2 "/source/dir/foo.h" |
| 13 | |
| 14 | ; CHECK-LABEL: @foo |
| 15 | define void @foo() !dbg !4 { |
| 16 | bb: |
| 17 | ret void, !dbg !10 |
| 18 | } |
| 19 | ; CHECK: .loc 2 1 |
| 20 | ; CHECK: ret |
| 21 | |
| 22 | ; CHECK-LABEL: @bar |
| 23 | define void @bar() !dbg !7 { |
| 24 | bb: |
| 25 | ret void, !dbg !11 |
| 26 | } |
| 27 | ; CHECK: .loc 1 2 |
| 28 | ; CHECK: ret |
| 29 | |
| 30 | !llvm.dbg.cu = !{!0} |
| 31 | !llvm.module.flags = !{!8, !9} |
| 32 | |
| 33 | !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "", isOptimized: false, runtimeVersion: 0, emissionKind: 2, enums: !2, subprograms: !3) |
| 34 | !1 = !DIFile(filename: "bar.cu", directory: "/source/dir") |
| 35 | !2 = !{} |
| 36 | !3 = !{!4, !7} |
| 37 | !4 = distinct !DISubprogram(name: "foo", scope: !5, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, variables: !2) |
| 38 | !5 = !DIFile(filename: "foo.h", directory: "/source/dir") |
| 39 | !6 = !DISubroutineType(types: !2) |
| 40 | !7 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 2, type: !6, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, variables: !2) |
| 41 | !8 = !{i32 2, !"Dwarf Version", i32 4} |
| 42 | !9 = !{i32 2, !"Debug Info Version", i32 3} |
| 43 | !10 = !DILocation(line: 1, column: 31, scope: !4) |
| 44 | !11 = !DILocation(line: 2, column: 31, scope: !7) |