]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/DebugInfo/X86/dbg-value-frame-index.ll
Vendor import of llvm trunk r291012:
[FreeBSD/FreeBSD.git] / test / DebugInfo / X86 / dbg-value-frame-index.ll
1 ; RUN: llc -mtriple=x86_64-unknown-unknown -o - %s | FileCheck %s
2
3 define i1 @test() !dbg !4 {
4 entry:
5   %end = alloca i64, align 8
6   br label %while.cond
7
8 while.cond:
9   call void @llvm.dbg.value(metadata i64* %end, i64 0, metadata !5, metadata !6), !dbg !7
10   %call = call i1 @fn(i64* %end, i64* %end, i64* null, i8* null, i64 0, i64* null, i32* null, i8* null), !dbg !7
11   br label %while.body
12
13 while.body:
14   br i1 0, label %while.end, label %while.cond
15
16 while.end:
17   ret i1 true
18 }
19
20 ; CHECK-LABEL: test
21 ; CHECK:       #DEBUG_VALUE: test:w <- [%RSP+8]
22
23 declare i1 @fn(i64*, i64*, i64*, i8*, i64, i64*, i32*, i8*)
24 declare void @llvm.dbg.value(metadata, i64, metadata, metadata)
25
26 !llvm.dbg.cu = !{!0}
27 !llvm.module.flags = !{!2,!3}
28
29 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 4.0.0", emissionKind: FullDebug)
30 !1 = !DIFile(filename: "test.c", directory: "/")
31 !2 = !{i32 2, !"Dwarf Version", i32 4}
32 !3 = !{i32 2, !"Debug Info Version", i32 3}
33 !4 = distinct !DISubprogram(name: "test", type: !10, unit: !0)
34 !5 = !DILocalVariable(name: "w", scope: !4, type: !9)
35 !6 = !DIExpression(DW_OP_deref)
36 !7 = !DILocation(line: 210, column: 12, scope: !4)
37 !8 = !{!9}
38 !9 = !DIBasicType(name: "bool", size: 8, encoding: DW_ATE_boolean)
39 !10 = !DISubroutineType(types: !8)