• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: llvm-mc -triple i386-apple-darwin %s -filetype=obj -o - | macho-dump | FileCheck %s
2
3// Make sure MC can handle file level .cfi_startproc and .cfi_endproc that creates
4// an empty frame.
5// rdar://10017184
6_proc:
7.cfi_startproc
8.cfi_endproc
9
10// Check that we don't produce a relocation for the CIE pointer and therefore
11// we have only one relocation in __debug_frame.
12
13	.section	__TEXT,__text,regular,pure_instructions
14	.globl	_f
15	.align	4, 0x90
16_f:                                     ## @f
17Ltmp0:
18	.cfi_startproc
19## BB#0:                                ## %entry
20	movl	$42, %eax
21	ret
22Ltmp1:
23	.cfi_endproc
24Leh_func_end0:
25
26	.cfi_sections .debug_frame
27Ltext_end:
28
29// CHECK:       (('section_name', '__debug_frame\x00\x00\x00')
30// CHECK-NEXT:   ('segment_name', '__DWARF\x00\x00\x00\x00\x00\x00\x00\x00\x00')
31// CHECK-NEXT:   ('address', 8)
32// CHECK-NEXT:   ('size', 52)
33// CHECK-NEXT:   ('offset', 332)
34// CHECK-NEXT:   ('alignment', 2)
35// CHECK-NEXT:   ('reloc_offset', 384)
36// CHECK-NEXT:   ('num_reloc', 2)
37// CHECK-NEXT:   ('flags', 0x2000000)
38// CHECK-NEXT:   ('reserved1', 0)
39// CHECK-NEXT:   ('reserved2', 0)
40// CHECK-NEXT:  ),
41// CHECK-NEXT: ('_relocations', [
42// CHECK-NEXT:   # Relocation 0
43// CHECK-NEXT:   (('word-0', 0x2c),
44// CHECK-NEXT:    ('word-1', 0x4000001)),
45// CHECK-NEXT:   # Relocation 1
46// CHECK-NEXT:   (('word-0', 0x1c),
47// CHECK-NEXT:    ('word-1', 0x4000001)),
48// CHECK-NEXT: ])
49