| 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 | |
| 15 | target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" |
| 16 | target triple = "armv7--linux-gnueabihf" |
| 17 | |
| Peter Collingbourne | d4135bb | 2016-09-13 01:12:59 +0000 | [diff] [blame] | 18 | @ch = common global i8 0, align 1, !dbg !8 |
| 19 | @b = common global i32 0, align 4, !dbg !10 |
| Sergey Dmitrouk | 46c4f02 | 2015-05-13 08:58:03 +0000 | [diff] [blame] | 20 | |
| 21 | ; Function Attrs: nounwind |
| Peter Collingbourne | d4bff30 | 2015-11-05 22:03:56 +0000 | [diff] [blame] | 22 | define void @proc() #0 !dbg !4 { |
| Sergey Dmitrouk | 46c4f02 | 2015-05-13 08:58:03 +0000 | [diff] [blame] | 23 | entry: |
| 24 | store i8 65, i8* @ch, align 1, !dbg !17 |
| 25 | store i32 0, i32* @b, align 4, !dbg !18 |
| 26 | ret void, !dbg !19 |
| 27 | } |
| 28 | |
| 29 | 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" } |
| 30 | |
| 31 | !llvm.dbg.cu = !{!0} |
| 32 | !llvm.module.flags = !{!12, !13, !14, !15} |
| 33 | !llvm.ident = !{!16} |
| 34 | |
| Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 35 | !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, emissionKind: FullDebug) |
| Sergey Dmitrouk | 46c4f02 | 2015-05-13 08:58:03 +0000 | [diff] [blame] | 36 | !1 = !DIFile(filename: "test.c", directory: "/home/user/clang/build") |
| 37 | !2 = !{} |
| Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 38 | !4 = distinct !DISubprogram(name: "proc", scope: !1, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) |
| Sergey Dmitrouk | 46c4f02 | 2015-05-13 08:58:03 +0000 | [diff] [blame] | 39 | !5 = !DISubroutineType(types: !6) |
| 40 | !6 = !{null} |
| 41 | !7 = !{!8, !10} |
| Adrian Prantl | 73ec065 | 2016-12-16 19:39:01 +0000 | [diff] [blame^] | 42 | !8 = !DIGlobalVariable(name: "ch", scope: !0, file: !1, line: 1, type: !9, isLocal: false, isDefinition: true) |
| Sergey Dmitrouk | 46c4f02 | 2015-05-13 08:58:03 +0000 | [diff] [blame] | 43 | !9 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_unsigned_char) |
| Adrian Prantl | 73ec065 | 2016-12-16 19:39:01 +0000 | [diff] [blame^] | 44 | !10 = !DIGlobalVariable(name: "b", scope: !0, file: !1, line: 2, type: !11, isLocal: false, isDefinition: true) |
| Sergey Dmitrouk | 46c4f02 | 2015-05-13 08:58:03 +0000 | [diff] [blame] | 45 | !11 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |
| 46 | !12 = !{i32 2, !"Dwarf Version", i32 4} |
| 47 | !13 = !{i32 2, !"Debug Info Version", i32 3} |
| 48 | !14 = !{i32 1, !"wchar_size", i32 4} |
| 49 | !15 = !{i32 1, !"min_enum_size", i32 4} |
| 50 | !16 = !{!"clang version 3.7.0 (http://llvm.org/git/clang.git 9b0abb9df531ef7928c8182120e1869affca17d5) (http://llvm.org/git/llvm.git b1e759524dd94f7ce1e24935daed8383927e96c1)"} |
| 51 | !17 = !DILocation(line: 6, column: 8, scope: !4) |
| 52 | !18 = !DILocation(line: 7, column: 7, scope: !4) |
| 53 | !19 = !DILocation(line: 8, column: 1, scope: !4) |