<commit_before>; RUN: llc < %s -mtriple=nvptx64-nvidia-cuda | FileCheck %s

; // Bitcode int this test case is reduced version of compiled code below:
;extern "C" {
;#line 1 "/source/dir/foo.h"
;__device__ void foo() {}
;#line 2 "/source/dir/bar.cu"
;__device__ void bar() {}
;}

; CHECK: .file   1 "/source/dir/bar.cu"
; CHECK: .file   2 "/source/dir/foo.h"

; CHECK-LABEL: @foo
define void @foo() !dbg !4 {
bb:
  ret void, !dbg !10
}
; CHECK: .loc 2 1
; CHECK: ret

; CHECK-LABEL: @bar
define void @bar() !dbg !7 {
bb:
  ret void, !dbg !11
}
; CHECK: .loc 1 2
; CHECK: ret

!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!8, !9}

!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "", isOptimized: false, runtimeVersion: 0, emissionKind: 2, enums: !2, subprograms: !3)
!1 = !DIFile(filename: "bar.cu", directory: "/source/dir")
!2 = !{}
!3 = !{!4, !7}
!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)
!5 = !DIFile(filename: "foo.h", directory: "/source/dir")
!6 = !DISubroutineType(types: !2)
!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)
!8 = !{i32 2, !"Dwarf Version", i32 4}
!9 = !{i32 2, !"Debug Info Version", i32 3}
!10 = !DILocation(line: 1, column: 31, scope: !4)<commit_msg>llvm/test/CodeGen/NVPTX/debug-file-loc.ll: Tweak expressions for dos path.<commit_after>; RUN: llc < %s -mtriple=nvptx64-nvidia-cuda | FileCheck %s

; // Bitcode int this test case is reduced version of compiled code below:
;extern "C" {
;#line 1 "/source/dir/foo.h"
;__device__ void foo() {}
;#line 2 "/source/dir/bar.cu"
;__device__ void bar() {}
;}

; CHECK: .file   1 "/source/dir{{/|\\\\}}bar.cu"
; CHECK: .file   2 "/source/dir{{/|\\\\}}foo.h"

; CHECK-LABEL: @foo
define void @foo() !dbg !4 {
bb:
  ret void, !dbg !10
}
; CHECK: .loc 2 1
; CHECK: ret

; CHECK-LABEL: @bar
define void @bar() !dbg !7 {
bb:
  ret void, !dbg !11
}
; CHECK: .loc 1 2
; CHECK: ret

!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!8, !9}

!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "", isOptimized: false, runtimeVersion: 0, emissionKind: 2, enums: !2, subprograms: !3)
!1 = !DIFile(filename: "bar.cu", directory: "/source/dir")
!2 = !{}
!3 = !{!4, !7}
!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)
!5 = !DIFile(filename: "foo.h", directory: "/source/dir")
!6 = !DISubroutineType(types: !2)
!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)
!8 = !{i32 2, !"Dwarf Version", i32 4}
!9 = !{i32 2, !"Debug Info Version", i32 3}
!10 = !DILocation(line: 1, column: 31, scope: !4)
{'fraction_non_alphanumeric': 0.20065040650406504, 'fraction_numerical': 0.043577235772357725, 'mean_word_length': 4.453900709219858, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1349945', 'n_tokens_mistral': 1315, 'n_tokens_neox': 1251, 'n_words': 376}