summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-23 15:34:32 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-23 15:34:32 +0000
commit88a564f55ee92e2ffe916d8d69271308d05479d1 (patch)
treeaf1ddcce1f9150f96762c61212f5ec5d41279e1e /test
parent1e1bf1bf76f3e851092fec95ba3f748b96174d8d (diff)
downloadllvm-88a564f55ee92e2ffe916d8d69271308d05479d1.tar.gz
llvm-88a564f55ee92e2ffe916d8d69271308d05479d1.tar.bz2
llvm-88a564f55ee92e2ffe916d8d69271308d05479d1.tar.xz
Allow using .cfi_startproc without a leading symbol.
This is possible now that we don't produce .eh symbols. This fixes pr19430. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211502 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/MC/AsmParser/cfi-invalid-startproc.s16
-rw-r--r--test/MC/ELF/pr19430.s14
2 files changed, 14 insertions, 16 deletions
diff --git a/test/MC/AsmParser/cfi-invalid-startproc.s b/test/MC/AsmParser/cfi-invalid-startproc.s
deleted file mode 100644
index 57ded13d0f..0000000000
--- a/test/MC/AsmParser/cfi-invalid-startproc.s
+++ /dev/null
@@ -1,16 +0,0 @@
-# RUN: not llvm-mc -triple=x86_64-apple-macosx10.8 -filetype=obj -o %t %s 2>&1 | FileCheck %s
-# Check that the cfi_startproc is declared after the beginning of
-# a procedure, otherwise it will reference an invalid symbol for
-# emitting the relocation.
-# <rdar://problem/15939159>
-
-# CHECK: No symbol to start a frame
-.text
-.cfi_startproc
-.globl _someFunction
-_someFunction:
-.cfi_def_cfa_offset 16
-.cfi_offset %rbp, -16
-.cfi_def_cfa_register rbp
- ret
-.cfi_endproc
diff --git a/test/MC/ELF/pr19430.s b/test/MC/ELF/pr19430.s
new file mode 100644
index 0000000000..a1e524662a
--- /dev/null
+++ b/test/MC/ELF/pr19430.s
@@ -0,0 +1,14 @@
+// RUN: llvm-mc -triple x86_64-pc-linux-gnu %s -filetype=obj -o - | llvm-readobj -r | FileCheck %s
+
+// Test that we can use .cfi_startproc without a global symbol.
+
+.text
+.space 1000
+.cfi_startproc
+ .cfi_endproc
+
+// CHECK: Relocations [
+// CHECK-NEXT: Section (5) .rela.eh_frame {
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x3E8
+// CHECK-NEXT: }
+// CHECK-NEXT: ]