OSDN Git Service

DebugInfo: preparation to implement DW_AT_alignment
[android-x86/external-llvm.git] / test / Bitcode / dilocalvariable-3.9.ll
1 ; RUN: llvm-dis -o - %s.bc | FileCheck %s
2
3 ; CHECK: !9 = !DILocalVariable(name: "i", scope: !6, file: !1, line: 3, type: !10)
4 ; CHECK: !10 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
5
6 source_filename = "test.cpp"
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
8 target triple = "x86_64-unknown-linux-gnu"
9
10 ; Function Attrs: nounwind uwtable
11 define void @_Z1fv() #0 !dbg !6 {
12 entry:
13   %i = alloca i32, align 4
14   call void @llvm.dbg.declare(metadata i32* %i, metadata !10, metadata !12), !dbg !13
15   store i32 42, i32* %i, align 4, !dbg !13
16   ret void, !dbg !14
17 }
18
19 ; Function Attrs: nounwind readnone
20 declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
21
22 attributes #0 = { nounwind uwtable }
23 attributes #1 = { nounwind readnone }
24
25 !llvm.dbg.cu = !{!0}
26 !llvm.module.flags = !{!3, !4}
27 !llvm.ident = !{!5}
28
29 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.1 (http://llvm.org/git/clang.git c3709e72d22432f53f8e2f14354def31a96734fe)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
30 !1 = !DIFile(filename: "test.cpp", directory: "/tmp")
31 !2 = !{}
32 !3 = !{i32 2, !"Dwarf Version", i32 4}
33 !4 = !{i32 2, !"Debug Info Version", i32 3}
34 !5 = !{!"clang version 3.9.1 (http://llvm.org/git/clang.git c3709e72d22432f53f8e2f14354def31a96734fe)"}
35 !6 = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", scope: !7, file: !7, line: 1, type: !8, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
36 !7 = !DIFile(filename: "test.cpp", directory: "/tmp")
37 !8 = !DISubroutineType(types: !9)
38 !9 = !{null}
39 !10 = !DILocalVariable(name: "i", scope: !6, file: !7, line: 3, type: !11)
40 !11 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
41 !12 = !DIExpression()
42 !13 = !DILocation(line: 3, column: 7, scope: !6)
43 !14 = !DILocation(line: 4, column: 1, scope: !6)