1; RUN: llc < %s -mtriple=nvptx64-nvidia-cuda | FileCheck --check-prefix=CHECK-NODIR %s 2; RUN: llc < %s -mtriple=nvptx64-nvidia-cuda -dwarf-directory=1 | FileCheck --check-prefix=CHECK-DIR %s 3; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64-nvidia-cuda | %ptxas-verify %} 4 5; CHECK-NODIR: .file {{[0-9]+}} "/tmp/dbginfo/a{{/|\\\\}}a.cpp" 6; 7; ptxas does not support .file directory syntax, but it can still be 8; forced by -dwarf-directory=1 9; CHECK-DIR: .file {{[0-9]+}} "/tmp/dbginfo/a" "a.cpp" 10 11define void @_Z4funcv() !dbg !4 { 12entry: 13 ret void, !dbg !5 14} 15 16!llvm.dbg.cu = !{!0} 17!llvm.module.flags = !{!8, !9} 18 19!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2, nameTableKind: None) 20!1 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo/a") 21!2 = !{} 22!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcv", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !1, type: !6, retainedNodes: !2) 23!5 = !DILocation(line: 2, scope: !4) 24!6 = !DISubroutineType(types: !7) 25!7 = !{null} 26!8 = !{i32 2, !"Dwarf Version", i32 4} 27!9 = !{i32 1, !"Debug Info Version", i32 3} 28 29