Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / ExecutionEngine / JITLink / x86-64 / MachO_gdb_jit_nonzero_alignment_offsets.s
blob7f313b42f1bf3ba51e58de2df06f33775662186c
1 # REQUIRES: system-darwin && asserts
2 # RUN: rm -rf %t && mkdir -p %t
3 # RUN: llvm-mc -triple x86_64-apple-macosx10.9 -filetype=obj \
4 # RUN: -o %t/MachO_extra_def_strong.o %S/Inputs/MachO_extra_def_strong.s
5 # RUN: llvm-mc -triple x86_64-apple-macosx10.9 -filetype=obj \
6 # RUN: -o %t/MachO_gdb_jit_nonzero_alignment_offsets.o %s
7 # RUN: llvm-jitlink -noexec -debugger-support \
8 # RUN: %t/MachO_gdb_jit_nonzero_alignment_offsets.o \
9 # RUN: %t/MachO_extra_def_strong.o
11 # Check that blocks with non-zero alignment offsets don't break debugging
12 # support.
14 # In this test case the ExtraDef symbol below will be overridden by a strong
15 # def in MachO_strong_defs_extra.s. This will leave main (with alignment 16,
16 # alignment offset 4) as the only block in __TEXT,__text. The testcase ensures
17 # that the debugging support plugin doesn't crash or throw an error in this
18 # case.
20 .section __TEXT,__text,regular,pure_instructions
21 .p2align 4, 0x90
23 .globl ExtraDef
24 .weak_definition ExtraDef
25 .p2align 2
26 ExtraDef:
27 .long 42
29 .globl _main
30 _main:
31 xorq %rax, %rax
32 retq
34 .section __DWARF,__debug_str,regular,debug
35 Linfo_string:
36 .asciz "test dwarf string"
38 .subsections_via_symbols