Revert "CodeGen][NewPM] Port MachineScheduler to NPM. (#125703)" (#126268)
[llvm-project.git] / llvm / test / ExecutionEngine / JITLink / x86-64 / MachO_cstring_section_splitting.s
blob0d68a10c59d19855fe648244acefad6b9e483922
1 # REQUIRES: asserts
2 # RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o %t %s
3 # RUN: llvm-jitlink -num-threads=0 -debug-only=jitlink -noexec \
4 # RUN: -entry hook %t 2>&1 \
5 # RUN: | FileCheck %s
7 # Verify that we split C string literals on null-terminators, rather than on
8 # symbol boundaries. We expect four dead-stripped symbols: l_str.0, l_str.2,
9 # L_str.3, l_str.4, and the auto-generated symbol for the start of the "defghi"
10 # string. We also verify that there are only two dead-stripped blocks, since
11 # l_str.3 should not have split the block started at "def"... (since this is a
12 # C string section we should be splitting on null characters instead of
13 # symbols).
15 # CHECK: Dead-stripping defined symbols:
16 # CHECK-NEXT: linkage: strong, scope: local, dead
17 # CHECK-NEXT: linkage: strong, scope: local, dead
18 # CHECK-NEXT: linkage: strong, scope: local, dead
19 # CHECK-NEXT: linkage: strong, scope: local, dead
20 # CHECK-NEXT: Dead-stripping blocks:
21 # CHECK-NEXT: content, align = 1, align-ofs = 0, section = __TEXT,__cstring
22 # CHECK-NEXT: content, align = 1, align-ofs = 0, section = __TEXT,__cstring
23 # CHECK-NEXT: Removing unused external symbols
25 .section __DATA,__data
26 .globl hook
27 .p2align 2
28 hook:
29 .quad l_str.1
31 .section __TEXT,__cstring,cstring_literals
32 l_str.0:
33 l_str.1:
34 .asciz "abc"
35 l_str.2:
36 .asciz ""
37 # anonymous start for "defghi", split in the middle by l_str.3. We expect this
38 # to be dead-stripped as a single block.
39 .byte 'd'
40 .byte 'e'
41 .byte 'f'
42 l_str.3:
43 .asciz "ghi"
45 .subsections_via_symbols