summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/early-cfi-sections.ll
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2017-01-02 18:05:27 +0000
committerJoerg Sonnenberger <joerg@bec.de>2017-01-02 18:05:27 +0000
commit7b83732a4025b5a3c652bfb585628104d995df8d (patch)
tree9099e67ddd72dbb8aeef58aa233333b08a806b93 /llvm/test/CodeGen/ARM/early-cfi-sections.ll
parent02c6b176e75c650ed1e312541035cb7c086d4da1 (diff)
downloadbcm5719-llvm-7b83732a4025b5a3c652bfb585628104d995df8d.tar.gz
bcm5719-llvm-7b83732a4025b5a3c652bfb585628104d995df8d.zip
Emit .cfi_sections before the first .cfi_startproc
GNU as rejects input where .cfi_sections is used after .cfi_startproc, if the new section differs from the old. Adjust our output to always emit .cfi_sections before the first .cfi_startproc to minimize necessary code. Differential Revision: https://reviews.llvm.org/D28011 llvm-svn: 290817
Diffstat (limited to 'llvm/test/CodeGen/ARM/early-cfi-sections.ll')
-rw-r--r--llvm/test/CodeGen/ARM/early-cfi-sections.ll31
1 files changed, 31 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/early-cfi-sections.ll b/llvm/test/CodeGen/ARM/early-cfi-sections.ll
new file mode 100644
index 00000000000..1fe901c9350
--- /dev/null
+++ b/llvm/test/CodeGen/ARM/early-cfi-sections.ll
@@ -0,0 +1,31 @@
+; RUN: llc < %s | FileCheck %s
+; RUN: llc -mtriple=arm-netbsd-eabi < %s | FileCheck %s
+; CHECK-NOT: .cfi_startproc
+; CHECK: .cfi_sections .debug_frame
+; CHECK: .cfi_startproc
+
+target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
+target triple = "armv4t--linux"
+
+; Function Attrs: nounwind
+define arm_aapcscc void @f() #0 !dbg !7 {
+entry:
+ ret void, !dbg !10
+}
+
+attributes #0 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="arm7tdmi" "target-features"="+soft-float,+strict-align,-crypto,-neon" "unsafe-fp-math"="false" "use-soft-float"="true" }
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!3, !4, !5, !6}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 4.0.0 (trunk 290216)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
+!1 = !DIFile(filename: "test.c", directory: "/tmp")
+!2 = !{}
+!3 = !{i32 2, !"Dwarf Version", i32 4}
+!4 = !{i32 2, !"Debug Info Version", i32 3}
+!5 = !{i32 1, !"wchar_size", i32 4}
+!6 = !{i32 1, !"min_enum_size", i32 4}
+!7 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !8, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
+!8 = !DISubroutineType(types: !9)
+!9 = !{null}
+!10 = !DILocation(line: 1, column: 1, scope: !7)
OpenPOWER on IntegriCloud