6bfd51b4c18d85ce6d7571b1c1949653810dc7da
[oota-llvm.git] / test / DebugInfo / constant-sdnodes-have-dbg-location.ll
1 ; RUN: llc -debug < %s 2>&1 | FileCheck %s
2 ; REQUIRES: asserts
3 ; XFAIL: *
4 ; disabled until constant coalescing is resolved
5
6 ; CHECK: 0x{{[0-9,a-f]+}}: i32 = Constant<-1>test.c:4:5
7
8 define i32 @main() {
9 entry:
10   %retval = alloca i32, align 4
11   store i32 0, i32* %retval
12   ret i32 -1, !dbg !10
13 }
14
15 !llvm.dbg.cu = !{!0}
16 !llvm.module.flags = !{!8, !9}
17
18 !0 = !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, subprograms: !3)
19 !1 = !DIFile(filename: "test.c", directory: "/home/user/clang-llvm/build")
20 !2 = !{}
21 !3 = !{!4}
22 !4 = !DISubprogram(name: "main", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, function: i32 ()* @main, variables: !2)
23 !5 = !DISubroutineType(types: !6)
24 !6 = !{!7}
25 !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
26 !8 = !{i32 2, !"Dwarf Version", i32 4}
27 !9 = !{i32 2, !"Debug Info Version", i32 3}
28 !10 = !DILocation(line: 4, column: 5, scope: !4)