Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / objc-methname.s
blobafc137eac8c2146acf6a7fed688d0b143cad2e9b
1 # REQUIRES: aarch64
2 # RUN: rm -rf %t; split-file %s %t
4 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/strings.s -o %t/strings.o
5 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/main.s -o %t/main.o
7 # RUN: %lld -arch arm64 -lSystem -o %t.out %t/strings.o %t/main.o --no-deduplicate-strings
9 # RUN: llvm-otool -vs __TEXT __cstring %t.out | FileCheck %s --check-prefix=CSTRING
10 # RUN: llvm-otool -vs __TEXT __objc_methname %t.out | FileCheck %s --check-prefix=METHNAME
12 # RUN: %lld -arch arm64 -lSystem -o %t/duplicates %t/strings.o %t/strings.o %t/main.o
14 # RUN: llvm-otool -vs __TEXT __cstring %t/duplicates | FileCheck %s --check-prefix=CSTRING
15 # RUN: llvm-otool -vs __TEXT __objc_methname %t/duplicates | FileCheck %s --check-prefix=METHNAME
17 # CSTRING: Contents of (__TEXT,__cstring) section
18 # CSTRING-NEXT: existing-cstring
19 # CSTIRNG-EMPTY:
21 # METHNAME: Contents of (__TEXT,__objc_methname) section
22 # METHNAME-NEXT: existing_methname
23 # METHNAME-NEXT: synthetic_methname
24 # METHNAME-EMPTY:
26 #--- strings.s
27 .cstring
28 .p2align 2
29 .asciz "existing-cstring"
31 .section __TEXT,__objc_methname,cstring_literals
32 .asciz "existing_methname"
34 #--- main.s
35 .text
36 .globl _objc_msgSend
37 _objc_msgSend:
38 ret
40 .globl _main
41 _main:
42 bl _objc_msgSend$existing_methname
43 bl _objc_msgSend$synthetic_methname
44 ret