File: dbg-line-0-no-discriminator.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (39 lines) | stat: -rw-r--r-- 1,678 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
; RUN: llc -filetype=obj -use-unknown-locations=Enable -mtriple=x86_64-unknown-linux %s -o %t
; RUN: llvm-dwarfdump -debug-line %t | FileCheck %s

define void @_Z3bazv() !dbg !6 {
  call void @_Z3foov(), !dbg !9
  call void @_Z3foov() ; no !dbg, so will be marked as line 0
  ret void, !dbg !11
}

declare void @_Z3foov()

!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 3.9.0 (trunk 267219)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
!1 = !DIFile(filename: "test.cc", directory: ".")
!2 = !{}
!3 = !{i32 2, !"Dwarf Version", i32 4}
!4 = !{i32 2, !"Debug Info Version", i32 3}
!5 = !{!"clang version 3.9.0 (trunk 267219)"}
!6 = distinct !DISubprogram(name: "baz", linkageName: "_Z3bazv", scope: !1, file: !1, line: 3, type: !7, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
!7 = !DISubroutineType(types: !8)
!8 = !{null}
!9 = !DILocation(line: 4, column: 3, scope: !10)
!10 = !DILexicalBlockFile(scope: !6, file: !1, discriminator: 1)
!11 = !DILocation(line: 6, column: 1, scope: !6)

; Look at the lengths. We can't verify the line-number-program size
; directly, but the difference in the two lengths should not change
; unexpectedly.
; CHECK:    total_length: 0x00000045
; CHECK: prologue_length: 0x0000001f
;
; Verify that we see a line entry with a discriminator, and the next entry
; has line 0 and no discriminator.
;             line column file ISA discriminator
; CHECK:      4    3      1    0   1
; CHECK-NEXT: 0    3      1    0   0