File: debugloc-no-line-0.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (49 lines) | stat: -rw-r--r-- 1,927 bytes parent folder | download | duplicates (23)
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
40
41
42
43
44
45
46
47
48
49
; RUN: llc -O0 -mtriple=x86_64-unknown-linux-gnu -stop-before="regallocfast" -o - %s | FileCheck %s
;
; We check that all the instructions in bb4 now have a debug-location
; annotation, and that the annotation is identical to the one on e.g.,
; the jmp to bb4.
;
; CHECK: JMP{{.*}}%bb.4, debug-location ![[JUMPLOC:[0-9]+]]
; CHECK: bb.4.entry:
; CHECK: successors:
; CHECK: JCC{{.*}}debug-location ![[JUMPLOC]]
; CHECK: JMP{{.*}}debug-location ![[JUMPLOC]]

define i32 @main() !dbg !12 {
entry:
  %add = add nsw i32 undef, 1, !dbg !16
  switch i32 %add, label %sw.epilog [
    i32 1, label %sw.bb
    i32 2, label %sw.bb2
  ], !dbg !17

sw.bb:                                            ; preds = %entry
  br label %sw.epilog, !dbg !20

sw.bb2:                                           ; preds = %entry
  br label %sw.epilog, !dbg !22

sw.epilog:                                        ; preds = %sw.bb2, %sw.bb, %entry
  ret i32 4711, !dbg !23
}
!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!8, !9}
!llvm.ident = !{!11}

!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, emissionKind: FullDebug, enums: !4)
!3 = !DIFile(filename: "foo.c", directory: ".")
!4 = !{}
!7 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed)
!8 = !{i32 2, !"Dwarf Version", i32 4}
!9 = !{i32 2, !"Debug Info Version", i32 3}
!11 = !{!"clang"}
!12 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 4, type: !13, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false, unit: !2, retainedNodes: !4)
!13 = !DISubroutineType(types: !14)
!14 = !{!7}
!16 = !DILocation(line: 6, column: 13, scope: !12)
!17 = !DILocation(line: 6, column: 3, scope: !12)
!19 = distinct !DILexicalBlock(scope: !12, file: !3, line: 7, column: 5)
!20 = !DILocation(line: 10, column: 7, scope: !19)
!22 = !DILocation(line: 13, column: 7, scope: !19)
!23 = !DILocation(line: 24, column: 1, scope: !12)