OSDN Git Service

[IR] redefine 'UnsafeAlgebra' / 'reassoc' fast-math-flags and add 'trans' fast-math...
[android-x86/external-llvm.git] / test / Bitcode / debug-loc-again.ll
1 ; RUN: llvm-as < %s | llvm-bcanalyzer -dump | FileCheck %s -check-prefix=BC
2 ; PR23436: Actually emit DEBUG_LOC_AGAIN records.
3
4 ; BC: <DEBUG_LOC op
5 ; BC: <DEBUG_LOC_AGAIN/>
6 ; BC: <DEBUG_LOC op
7 ; BC: <DEBUG_LOC_AGAIN/>
8
9 ; RUN: llvm-as < %s | llvm-dis | FileCheck %s
10 ; RUN: verify-uselistorder %s
11 ; Check that this round-trips correctly.
12
13 define void @foo() {
14 entry:
15   %a = add i32 0, 0, !dbg !3
16   %b = add i32 0, 1, !dbg !3
17   %c = add i32 0, 2, !dbg !4
18   ret void, !dbg !4
19 }
20
21 ; CHECK-LABEL: entry:
22 ; CHECK-NEXT: %a = add i32 0, 0, !dbg ![[LINE1:[0-9]+]]
23 ; CHECK-NEXT: %b = add i32 0, 1, !dbg ![[LINE1]]
24 ; CHECK-NEXT: %c = add i32 0, 2, !dbg ![[LINE2:[0-9]+]]
25 ; CHECK-NEXT: ret void, !dbg ![[LINE2]]
26 ; CHECK: ![[LINE1]] = !DILocation(line: 1,
27 ; CHECK: ![[LINE2]] = !DILocation(line: 2,
28
29 !llvm.module.flags = !{!0}
30 !llvm.dbg.cu = !{!1}
31
32 !0 = !{i32 2, !"Debug Info Version", i32 3}
33 !1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !DIFile(filename: "f", directory: "/d"))
34 !2 = distinct !DISubprogram(name: "foo", unit: !1)
35 !3 = !DILocation(line: 1, scope: !2)
36 !4 = !DILocation(line: 2, scope: !2)