File: loc-only.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (23 lines) | stat: -rw-r--r-- 970 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
; RUN: opt -passes=debugify -S < %s | FileCheck --check-prefixes=ALL,VALUE %s
; RUN: opt -passes=debugify -debugify-level=locations -S < %s | FileCheck --check-prefixes=ALL --implicit-check-not=dbg.value %s

; RUN: opt -passes=debugify -S < %s --try-experimental-debuginfo-iterators | FileCheck --check-prefixes=ALL,VALUE %s

; ALL-LABEL: @test
define void @test() {
  %add = add i32 1, 2
; ALL-NEXT:  %add = add i32 1, 2, !dbg [[L1:![0-9]+]]
; VALUE-NEXT: #dbg_value(i32 %add, [[add:![0-9]+]], !DIExpression(), [[L1]]
  %sub = sub i32 %add, 1
; ALL-NEXT: %sub = sub i32 %add, 1, !dbg [[L2:![0-9]+]]
; VALUE-NEXT: #dbg_value(i32 %sub, [[sub:![0-9]+]], !DIExpression(), [[L2]]
; ALL-NEXT: ret void, !dbg [[L3:![0-9]+]]
  ret void
}

; VALUE: [[add]] = !DILocalVariable
; VALUE: [[sub]] = !DILocalVariable

; ALL: [[L1]] = !DILocation(line: 1, column: 1, scope:
; ALL: [[L2]] = !DILocation(line: 2, column: 1, scope:
; ALL: [[L3]] = !DILocation(line: 3, column: 1, scope: