summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM
diff options
context:
space:
mode:
authorDavid Candler <david.candler@arm.com>2019-10-31 08:55:57 +0000
committerDavid Candler <david.candler@arm.com>2019-10-31 09:48:30 +0000
commit92aa0c2dbcb723d102c508f6e7559330b637f912 (patch)
treec4935901211b87e2c4988d5a01110f9d3ce300f3 /llvm/test/CodeGen/ARM
parent9c739252261ea762d1bbbd8234d93c9038711fcd (diff)
downloadbcm5719-llvm-92aa0c2dbcb723d102c508f6e7559330b637f912.tar.gz
bcm5719-llvm-92aa0c2dbcb723d102c508f6e7559330b637f912.zip
[cfi] Add flag to always generate .debug_frame
This adds a flag to LLVM and clang to always generate a .debug_frame section, even if other debug information is not being generated. In situations where .eh_frame would normally be emitted, both .debug_frame and .eh_frame will be used. Differential Revision: https://reviews.llvm.org/D67216
Diffstat (limited to 'llvm/test/CodeGen/ARM')
-rw-r--r--llvm/test/CodeGen/ARM/dwarf-frame.ll38
1 files changed, 38 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/dwarf-frame.ll b/llvm/test/CodeGen/ARM/dwarf-frame.ll
new file mode 100644
index 00000000000..a15c9c50f5a
--- /dev/null
+++ b/llvm/test/CodeGen/ARM/dwarf-frame.ll
@@ -0,0 +1,38 @@
+; RUN: llc -mtriple armv7-unknown -frame-pointer=all -filetype=asm -o - %s | FileCheck %s --check-prefix=CHECK-NO-CFI
+; RUN: llc -mtriple armv7-unknown -frame-pointer=all -filetype=asm -force-dwarf-frame-section -o - %s | FileCheck %s --check-prefix=CHECK-ALWAYS-CFI
+
+declare void @dummy_use(i32*, i32)
+
+define void @test_basic() #0 {
+ %mem = alloca i32, i32 10
+ call void @dummy_use (i32* %mem, i32 10)
+ ret void
+}
+
+; CHECK-NO-CFI-LABEL: test_basic:
+; CHECK-NO-CFI: .fnstart
+; CHECK-NO-CFI-NOT: .cfi_sections .debug_frame
+; CHECK-NO-CFI-NOT: .cfi_startproc
+; CHECK-NO-CFI: @ %bb.0:
+; CHECK-NO-CFI: push {r11, lr}
+; CHECK-NO-CFI-NOT: .cfi_def_cfa_offset 8
+; CHECK-NO-CFI-NOT: .cfi_offset lr, -4
+; CHECK-NO-CFI-NOT: .cfi_offset r11, -8
+; CHECK-NO-CFI: mov r11, sp
+; CHECK-NO-CFI-NOT: .cfi_def_cfa_register r11
+; CHECK-NO-CFI-NOT: .cfi_endproc
+; CHECK-NO-CFI: .fnend
+
+; CHECK-ALWAYS-CFI-LABEL: test_basic:
+; CHECK-ALWAYS-CFI: .fnstart
+; CHECK-ALWAYS-CFI: .cfi_sections .debug_frame
+; CHECK-ALWAYS-CFI: .cfi_startproc
+; CHECK-ALWAYS-CFI: @ %bb.0:
+; CHECK-ALWAYS-CFI: push {r11, lr}
+; CHECK-ALWAYS-CFI: .cfi_def_cfa_offset 8
+; CHECK-ALWAYS-CFI: .cfi_offset lr, -4
+; CHECK-ALWAYS-CFI: .cfi_offset r11, -8
+; CHECK-ALWAYS-CFI: mov r11, sp
+; CHECK-ALWAYS-CFI: .cfi_def_cfa_register r11
+; CHECK-ALWAYS-CFI: .cfi_endproc
+; CHECK-ALWAYS-CFI: .fnend
OpenPOWER on IntegriCloud