Reapply r235977 "[DebugInfo] Add debug locations to constant SD nodes"
[oota-llvm.git] / test / DebugInfo / ARM / constant-dbgloc.ll
1 ; RUN: llc -filetype=asm %s -o - | FileCheck %s
2
3 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
4 target triple = "armv7--linux-gnueabihf"
5
6 ; int
7 ; main(void)
8 ; {
9 ;     return -1;
10 ; }
11
12 ; CHECK: test.c:4:5
13 ; CHECK: mvn
14
15 ; Function Attrs: nounwind
16 define i32 @main() {
17 entry:
18   %retval = alloca i32, align 4
19   store i32 0, i32* %retval
20   ret i32 -1, !dbg !11
21 }
22
23 !llvm.dbg.cu = !{!0}
24 !llvm.module.flags = !{!8, !9}
25
26 !0 = !MDCompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, subprograms: !3)
27 !1 = !MDFile(filename: "test.c", directory: "/home/user/clang/build")
28 !2 = !{}
29 !3 = !{!4}
30 !4 = !MDSubprogram(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)
31 !5 = !MDSubroutineType(types: !6)
32 !6 = !{!7}
33 !7 = !MDBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
34 !8 = !{i32 2, !"Dwarf Version", i32 4}
35 !9 = !{i32 2, !"Debug Info Version", i32 3}
36 !10 = !{i32 1, !"wchar_size", i32 4}
37 !11 = !MDLocation(line: 4, column: 5, scope: !4)