<commit_before>; Verify "no source location" directives appear in appropriate places,
; but don't appear when we explicitly suppress them.
; RUN: llc < %s -o - | FileCheck %s
; RUN: llc < %s -o - -use-unknown-locations=Disable | FileCheck %s --check-prefix=DISABLE

; Generated from this .cpp targeting linux using -g
; and then removed function attributes as clutter.
;
; void bar(int *);
; void baz(int *);
; # 5 "no-source-loc.cpp"
; void foo(int x) {
;   int z;
;   if (x)
; # 20 "include.h"
;     bar(&z);
; # 10 "no-source-loc.cpp"
;   baz(&z);
; }

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: uwtable
define void @_Z3fooi(i32 %x) !dbg !6 {
entry:
  %x.addr = alloca i32, align 4
  %z = alloca i32, align 4
  store i32 %x, i32* %x.addr, align 4
  %0 = load i32, i32* %x.addr, align 4, !dbg !8
  %tobool = icmp ne i32 %0, 0, !dbg !8
  br i1 %tobool, label %if.then, label %if.end, !dbg !8

if.then:                                          ; preds = %entry
  call void @_Z3barPi(i32* %z), !dbg !9
  br label %if.end, !dbg !9

if.end:                                           ; preds = %if.then, %entry
  call void @_Z3bazPi(i32* %z), !dbg !12
  ret void, !dbg !14
}

; CHECK:      .loc 1 7 7 prologue_end
; CHECK-NOT:  .loc
; CHECK:      # %bb.1
; CHECK-NEXT: .file 2 "/tests/include.h"
; CHECK-NEXT: .loc 2 20 5
; CHECK-NOT:  .loc
; CHECK:      .LBB0_2:
; CHECK:      .loc 1 10 3
;
; DISABLE-NOT: .loc 1 0

declare void @_Z3barPi(i32*)

declare void @_Z3bazPi(i32*)

!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3, !4}
!llvm.ident = !{!5}

!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 4.0.0 (trunk 278782)", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2)
!1 = !DIFile(filename: "no-source-loc.cpp", directory: "/tests")
!2 = !{}
!3 = !{i32 2, !"Dwarf Version", i32 4}
!4 = !{i32 2, !"Debug Info Version", i32 3}
!5 = !{!"clang version 4.0.0 (trunk 278782)"}
!6 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 5, type: !7, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
!7 = !DISubroutineType(types: !2)
!8 = !DILocation(line: 7, column: 7, scope: !6)<commit_msg>Fix dwarf-no-source-loc.ll path separator on Windows<commit_after>; Verify "no source location" directives appear in appropriate places,
; but don't appear when we explicitly suppress them.
; RUN: llc < %s -o - | FileCheck %s
; RUN: llc < %s -o - -use-unknown-locations=Disable | FileCheck %s --check-prefix=DISABLE

; Generated from this .cpp targeting linux using -g
; and then removed function attributes as clutter.
;
; void bar(int *);
; void baz(int *);
; # 5 "no-source-loc.cpp"
; void foo(int x) {
;   int z;
;   if (x)
; # 20 "include.h"
;     bar(&z);
; # 10 "no-source-loc.cpp"
;   baz(&z);
; }

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: uwtable
define void @_Z3fooi(i32 %x) !dbg !6 {
entry:
  %x.addr = alloca i32, align 4
  %z = alloca i32, align 4
  store i32 %x, i32* %x.addr, align 4
  %0 = load i32, i32* %x.addr, align 4, !dbg !8
  %tobool = icmp ne i32 %0, 0, !dbg !8
  br i1 %tobool, label %if.then, label %if.end, !dbg !8

if.then:                                          ; preds = %entry
  call void @_Z3barPi(i32* %z), !dbg !9
  br label %if.end, !dbg !9

if.end:                                           ; preds = %if.then, %entry
  call void @_Z3bazPi(i32* %z), !dbg !12
  ret void, !dbg !14
}

; CHECK:      .loc 1 7 7 prologue_end
; CHECK-NOT:  .loc
; CHECK:      # %bb.1
; CHECK-NEXT: .file 2 "/tests{{[/\]+}}include.h"
; CHECK-NEXT: .loc 2 20 5
; CHECK-NOT:  .loc
; CHECK:      .LBB0_2:
; CHECK:      .loc 1 10 3
;
; DISABLE-NOT: .loc 1 0

declare void @_Z3barPi(i32*)

declare void @_Z3bazPi(i32*)

!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3, !4}
!llvm.ident = !{!5}

!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 4.0.0 (trunk 278782)", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2)
!1 = !DIFile(filename: "no-source-loc.cpp", directory: "/tests")
!2 = !{}
!3 = !{i32 2, !"Dwarf Version", i32 4}
!4 = !{i32 2, !"Debug Info Version", i32 3}
!5 = !{!"clang version 4.0.0 (trunk 278782)"}
!6 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 5, type: !7, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
!7 = !DISubroutineType(types: !2)
!8 = !DILocation(line: 7, column: 7, scope: !6)
{'fraction_non_alphanumeric': 0.17465388711395102, 'fraction_numerical': 0.06347177848775293, 'mean_word_length': 3.152077807250221, 'pattern_counts': {'":': 0, '<': 7, '<?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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2967051', 'n_tokens_mistral': 2082, 'n_tokens_neox': 1908, 'n_words': 566}