1# REQUIRES: asserts
2# RUN: llvm-mc -triple=x86_64-apple-macos10.9 -filetype=obj -o %t %s
3# RUN: llvm-jitlink -debug-only=jitlink -noexec %t 2>&1 | FileCheck %s
4#
5# Verify that PC-begin candidate symbols have been sorted correctly when adding
6# PC-begin edges for FDEs. In this test both _main and _X are at address zero,
7# however we expect to select _main over _X as _X is common. If the sorting
8# fails we'll trigger an assert in EHFrameEdgeFixer, otherwise this test will
9# succeed.
10#
11# CHECK: Graphifying C-string literal section __TEXT,__cstring
12# CHECK:    Created block {{.*}} -- {{.*}}, align = 16, align-ofs = 0 for "abcdefghijklmno"
13
14	.section	__TEXT,__text,regular,pure_instructions
15	.build_version macos, 12, 0
16	.globl	_main
17	.p2align	4, 0x90
18_main:
19	retq
20
21	.section	__TEXT,__cstring,cstring_literals
22	.p2align	4
23L_.str.1:
24	.asciz	"abcdefghijklmno"
25
26.subsections_via_symbols
27