summaryrefslogtreecommitdiff
path: root/test/MC/MachO/debug_frame.s
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-08-24 22:31:37 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-08-24 22:31:37 +0000
commit5fbe5e783ee0c5ae27c17490a752d7e603e84ed2 (patch)
tree3b0249c8a909dd3d5bd28c461f317317946655d3 /test/MC/MachO/debug_frame.s
parent070260cb29ca9024d4fa1d3aabd6c8320b747f5e (diff)
downloadllvm-5fbe5e783ee0c5ae27c17490a752d7e603e84ed2.tar.gz
llvm-5fbe5e783ee0c5ae27c17490a752d7e603e84ed2.tar.bz2
llvm-5fbe5e783ee0c5ae27c17490a752d7e603e84ed2.tar.xz
Some autoconf tests use module level inline asm to test compiler's handling of
.cfi_startproc. e.g. libffi: $ cat confopt.c asm (".cfi_startproc\n\t.cfi_endproc"); int main () { return 0; } Teach MC / dwarf emission to handle these cfi directives which essentially create an empty frame. rdar://10017184 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/MachO/debug_frame.s')
-rw-r--r--test/MC/MachO/debug_frame.s15
1 files changed, 12 insertions, 3 deletions
diff --git a/test/MC/MachO/debug_frame.s b/test/MC/MachO/debug_frame.s
index 47264ef879..20bfd8dde2 100644
--- a/test/MC/MachO/debug_frame.s
+++ b/test/MC/MachO/debug_frame.s
@@ -1,5 +1,11 @@
// RUN: llvm-mc -triple i386-apple-darwin %s -filetype=obj -o - | macho-dump | FileCheck %s
+// Make sure MC can handle file level .cfi_startproc and .cfi_endproc that creates
+// an empty frame.
+// rdar://10017184
+.cfi_startproc
+.cfi_endproc
+
// Check that we don't produce a relocation for the CIE pointer and therefore
// we have only one relocation in __debug_frame.
@@ -22,17 +28,20 @@ Ltext_end:
// CHECK: (('section_name', '__debug_frame\x00\x00\x00')
// CHECK-NEXT: ('segment_name', '__DWARF\x00\x00\x00\x00\x00\x00\x00\x00\x00')
// CHECK-NEXT: ('address', 8)
-// CHECK-NEXT: ('size', 36)
+// CHECK-NEXT: ('size', 52)
// CHECK-NEXT: ('offset', 332)
// CHECK-NEXT: ('alignment', 2)
-// CHECK-NEXT: ('reloc_offset', 368)
-// CHECK-NEXT: ('num_reloc', 1)
+// CHECK-NEXT: ('reloc_offset', 384)
+// CHECK-NEXT: ('num_reloc', 2)
// CHECK-NEXT: ('flags', 0x2000000)
// CHECK-NEXT: ('reserved1', 0)
// CHECK-NEXT: ('reserved2', 0)
// CHECK-NEXT: ),
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
+// CHECK-NEXT: (('word-0', 0x2c),
+// CHECK-NEXT: ('word-1', 0x4000001)),
+// CHECK-NEXT: # Relocation 1
// CHECK-NEXT: (('word-0', 0x1c),
// CHECK-NEXT: ('word-1', 0x4000001)),
// CHECK-NEXT: ])