Sergey Dmitrouk | 46c4f02 | 2015-05-13 08:58:03 +0000 | [diff] [blame] | 1 | ; RUN: llc -filetype=asm -asm-verbose=0 < %s | FileCheck %s |
| 2 | |
| 3 | ; char ch; |
| 4 | ; int b; |
| 5 | ; |
| 6 | ; void proc (void) |
| 7 | ; { |
| 8 | ; ch = 'A'; |
| 9 | ; b = 0; // <== this should have correct location |
| 10 | ; } |
| 11 | |
| 12 | ; CHECK: .loc 1 7 7 |
| 13 | ; CHECK: mov r{{[0-9]}}, #0 |
| 14 | |
Adrian Prantl | 1eadba1 | 2016-12-22 00:45:21 +0000 | [diff] [blame] | 15 | source_filename = "test/DebugInfo/ARM/multiple-constant-uses-drops-dbgloc.ll" |
Sergey Dmitrouk | 46c4f02 | 2015-05-13 08:58:03 +0000 | [diff] [blame] | 16 | target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" |
| 17 | target triple = "armv7--linux-gnueabihf" |
| 18 | |
Adrian Prantl | 1eadba1 | 2016-12-22 00:45:21 +0000 | [diff] [blame] | 19 | @ch = common global i8 0, align 1, !dbg !0 |
| 20 | @b = common global i32 0, align 4, !dbg !5 |
Sergey Dmitrouk | 46c4f02 | 2015-05-13 08:58:03 +0000 | [diff] [blame] | 21 | |
| 22 | ; Function Attrs: nounwind |
Adrian Prantl | 1eadba1 | 2016-12-22 00:45:21 +0000 | [diff] [blame] | 23 | define void @proc() #0 !dbg !13 { |
Sergey Dmitrouk | 46c4f02 | 2015-05-13 08:58:03 +0000 | [diff] [blame] | 24 | entry: |
| 25 | store i8 65, i8* @ch, align 1, !dbg !17 |
| 26 | store i32 0, i32* @b, align 4, !dbg !18 |
| 27 | ret void, !dbg !19 |
| 28 | } |
| 29 | |
| 30 | attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="cortex-a8" "target-features"="+neon,+vfp3" "unsafe-fp-math"="false" "use-soft-float"="false" } |
| 31 | |
Adrian Prantl | 1eadba1 | 2016-12-22 00:45:21 +0000 | [diff] [blame] | 32 | !llvm.dbg.cu = !{!2} |
| 33 | !llvm.module.flags = !{!8, !9, !10, !11} |
| 34 | !llvm.ident = !{!12} |
Sergey Dmitrouk | 46c4f02 | 2015-05-13 08:58:03 +0000 | [diff] [blame] | 35 | |
Adrian Prantl | 1eadba1 | 2016-12-22 00:45:21 +0000 | [diff] [blame] | 36 | !0 = !DIGlobalVariableExpression(var: !1) |
| 37 | !1 = !DIGlobalVariable(name: "ch", scope: !2, file: !3, line: 1, type: !4, isLocal: false, isDefinition: true) |
| 38 | !2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) |
| 39 | !3 = !DIFile(filename: "test.c", directory: "/home/user/clang/build") |
| 40 | !4 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_unsigned_char) |
| 41 | !5 = !DIGlobalVariableExpression(var: !6) |
| 42 | !6 = !DIGlobalVariable(name: "b", scope: !2, file: !3, line: 2, type: !7, isLocal: false, isDefinition: true) |
| 43 | !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |
| 44 | !8 = !{i32 2, !"Dwarf Version", i32 4} |
| 45 | !9 = !{i32 2, !"Debug Info Version", i32 3} |
| 46 | !10 = !{i32 1, !"wchar_size", i32 4} |
| 47 | !11 = !{i32 1, !"min_enum_size", i32 4} |
| 48 | !12 = !{!"clang version 3.7.0 (http://llvm.org/git/clang.git 9b0abb9df531ef7928c8182120e1869affca17d5) (http://llvm.org/git/llvm.git b1e759524dd94f7ce1e24935daed8383927e96c1)"} |
| 49 | !13 = distinct !DISubprogram(name: "proc", scope: !3, file: !3, line: 4, type: !14, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false, unit: !2, variables: !16) |
| 50 | !14 = !DISubroutineType(types: !15) |
| 51 | !15 = !{null} |
| 52 | !16 = !{} |
| 53 | !17 = !DILocation(line: 6, column: 8, scope: !13) |
| 54 | !18 = !DILocation(line: 7, column: 7, scope: !13) |
| 55 | !19 = !DILocation(line: 8, column: 1, scope: !13) |
| 56 | |