blob: 861c4ecefa98207d3c0b9d9dd6f7998c475bfbc6 [file] [log] [blame]
Sergey Dmitrouk3cc62b32015-04-08 10:10:12 +00001; RUN: llc -mtriple=armv7-none-linux-gnueabihf < %s -o - | FileCheck %s
2
3; Function Attrs: nounwind
Peter Collingbourned4bff302015-11-05 22:03:56 +00004define void @need_cfi_def_cfa_offset() #0 !dbg !3 {
Sergey Dmitrouk3cc62b32015-04-08 10:10:12 +00005; CHECK-LABEL: need_cfi_def_cfa_offset:
6; CHECK: sub sp, sp, #4
7; CHECK: .cfi_def_cfa_offset 4
8entry:
9 %Depth = alloca i32, align 4
10 call void @llvm.dbg.declare(metadata i32* %Depth, metadata !9, metadata !10), !dbg !11
11 store i32 2, i32* %Depth, align 4, !dbg !11
12 ret void, !dbg !12
13}
14
15; Function Attrs: nounwind readnone
16declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
17
18attributes #0 = { nounwind }
19attributes #1 = { nounwind readnone }
20
21!llvm.dbg.cu = !{!0}
22!llvm.module.flags = !{!7, !8}
23
Adrian Prantl75819ae2016-04-15 15:57:41 +000024!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, emissionKind: FullDebug)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000025!1 = !DIFile(filename: "file.c", directory: "/dir")
Sergey Dmitrouk3cc62b32015-04-08 10:10:12 +000026!2 = !{}
Adrian Prantl75819ae2016-04-15 15:57:41 +000027!3 = distinct !DISubprogram(name: "need_cfi_def_cfa_offset", scope: !1, file: !1, line: 1, type: !4, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, variables: !2)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000028!4 = !DISubroutineType(types: !5)
Sergey Dmitrouk3cc62b32015-04-08 10:10:12 +000029!5 = !{null}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000030!6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
Sergey Dmitrouk3cc62b32015-04-08 10:10:12 +000031!7 = !{i32 2, !"Dwarf Version", i32 4}
32!8 = !{i32 2, !"Debug Info Version", i32 3}
Duncan P. N. Exon Smithed013cd2015-07-31 18:58:39 +000033!9 = !DILocalVariable(name: "Depth", scope: !3, file: !1, line: 3, type: !6)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000034!10 = !DIExpression()
35!11 = !DILocation(line: 3, column: 9, scope: !3)
36!12 = !DILocation(line: 7, column: 5, scope: !3)