1 ; Verify the behavior of the IntelJITEventListener.
2 ; RUN: llvm-jitlistener %s | FileCheck %s
4 ; This test was created using the following file:
11 ; CHECK: Method load [1]: foo, Size = {{[0-9]+}}
12 ; CHECK: Line info @ {{[0-9]+}}: simple.c, line 1
13 ; CHECK: Line info @ {{[0-9]+}}: simple.c, line 2
14 ; CHECK: Method unload [1]
16 ; ModuleID = 'simple.c'
18 ; Function Attrs: nounwind uwtable
19 define i32 @foo(i32 %a) #0 !dbg !4 {
21 %a.addr = alloca i32, align 4
22 store i32 %a, i32* %a.addr, align 4
23 call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !12, metadata !13), !dbg !14
24 %0 = load i32, i32* %a.addr, align 4, !dbg !15
28 ; Function Attrs: nounwind readnone
29 declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
31 attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
32 attributes #1 = { nounwind readnone }
35 !llvm.module.flags = !{!9, !10}
38 !0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 (trunk)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
39 !1 = !DIFile(filename: "simple.c", directory: "F:\5Cusers\5Cakaylor\5Cllvm-s\5Cllvm\5Ctest\5CJitListener")
41 !4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, retainedNodes: !2)
42 !5 = !DIFile(filename: "simple.c", directory: "F:CusersCakaylorCllvm-sCllvmCtestCJitListener")
43 !6 = !DISubroutineType(types: !7)
45 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
46 !9 = !{i32 2, !"Dwarf Version", i32 4}
47 !10 = !{i32 2, !"Debug Info Version", i32 3}
48 !11 = !{!"clang version 3.6.0 (trunk)"}
49 !12 = !DILocalVariable(name: "a", line: 1, arg: 1, scope: !4, file: !5, type: !8)
51 !14 = !DILocation(line: 1, column: 13, scope: !4)
52 !15 = !DILocation(line: 2, column: 10, scope: !4)
53 !16 = !DILocation(line: 2, column: 3, scope: !4)