blob: 008e9ce54583eaddb640677933aab3e53984ecb3 [file] [log] [blame]
Artem Belevicha8455f22016-02-11 18:21:47 +00001; 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
NAKAMURA Takumie5fc9f32016-02-11 23:59:43 +000011; CHECK: .file 1 "/source/dir{{/|\\\\}}bar.cu"
12; CHECK: .file 2 "/source/dir{{/|\\\\}}foo.h"
Artem Belevicha8455f22016-02-11 18:21:47 +000013
14; CHECK-LABEL: @foo
15define void @foo() !dbg !4 {
16bb:
17 ret void, !dbg !10
18}
19; CHECK: .loc 2 1
20; CHECK: ret
21
22; CHECK-LABEL: @bar
23define void @bar() !dbg !7 {
24bb:
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
Adrian Prantl75819ae2016-04-15 15:57:41 +000033!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2)
Artem Belevicha8455f22016-02-11 18:21:47 +000034!1 = !DIFile(filename: "bar.cu", directory: "/source/dir")
35!2 = !{}
Adrian Prantl75819ae2016-04-15 15:57:41 +000036!4 = distinct !DISubprogram(name: "foo", scope: !5, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
Artem Belevicha8455f22016-02-11 18:21:47 +000037!5 = !DIFile(filename: "foo.h", directory: "/source/dir")
38!6 = !DISubroutineType(types: !2)
Adrian Prantl75819ae2016-04-15 15:57:41 +000039!7 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 2, type: !6, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
Artem Belevicha8455f22016-02-11 18:21:47 +000040!8 = !{i32 2, !"Dwarf Version", i32 4}
41!9 = !{i32 2, !"Debug Info Version", i32 3}
42!10 = !DILocation(line: 1, column: 31, scope: !4)
43!11 = !DILocation(line: 2, column: 31, scope: !7)