|
| 1 | +;; Checks that when an instruction at the start of a BasicBlock has the same |
| 2 | +;; DebugLoc as the instruction at the end of the previous BasicBlock, we add |
| 3 | +;; is_stmt to the new line, to ensure that we still step on it if we arrive from |
| 4 | +;; a BasicBlock other than the immediately preceding one. |
| 5 | + |
| 6 | +; RUN: %llc_dwarf -mtriple=x86_64-unknown-linux -O0 -filetype=obj < %s | llvm-dwarfdump --debug-line - | FileCheck %s |
| 7 | + |
| 8 | +; CHECK: {{0x[0-9a-f]+}} 13 5 {{.+}} is_stmt |
| 9 | +; CHECK-NEXT: {{0x[0-9a-f]+}} 13 5 {{.+}} is_stmt |
| 10 | + |
| 11 | +define void @_Z1fi(i1 %cond) !dbg !21 { |
| 12 | +entry: |
| 13 | + br i1 %cond, label %if.then2, label %if.else4 |
| 14 | + |
| 15 | +if.then2: ; preds = %entry |
| 16 | + br label %if.end8, !dbg !24 |
| 17 | + |
| 18 | +if.else4: ; preds = %entry |
| 19 | + %0 = load i32, ptr null, align 4, !dbg !24 |
| 20 | + %call5 = call i1 null(i32 %0) |
| 21 | + ret void |
| 22 | + |
| 23 | +if.end8: ; preds = %if.then2 |
| 24 | + ret void |
| 25 | +} |
| 26 | + |
| 27 | +!llvm.dbg.cu = !{!0} |
| 28 | +!llvm.module.flags = !{!20} |
| 29 | + |
| 30 | +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 20.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) |
| 31 | +!1 = !DIFile(filename: "test.cpp", directory: "/home/gbtozers/dev/upstream-llvm") |
| 32 | +!20 = !{i32 2, !"Debug Info Version", i32 3} |
| 33 | +!21 = distinct !DISubprogram(name: "f", linkageName: "_Z1fi", scope: !1, file: !1, line: 7, type: !22, scopeLine: 7, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0) |
| 34 | +!22 = distinct !DISubroutineType(types: !23) |
| 35 | +!23 = !{null} |
| 36 | +!24 = !DILocation(line: 13, column: 5, scope: !25) |
| 37 | +!25 = distinct !DILexicalBlock(scope: !21, file: !1, line: 11, column: 27) |
0 commit comments