Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / COFF / export-tricky-names.s
blobbd39d68c637d813490f708fc962f452fbccecce1
1 # REQUIRES: x86
3 # RUN: echo -e "EXPORTS\n foo.bar" > %t.def
5 # RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -defsym drectve=0 %s -o %t.obj
6 # RUN: lld-link -entry:dllmain -dll -def:%t.def %t.obj -out:%t.1.dll
7 # RUN: llvm-readobj --coff-exports %t.1.dll | FileCheck %s
9 # RUN: lld-link -entry:dllmain -dll %t.obj -out:%t.2.dll -export:foo.bar
10 # RUN: llvm-readobj --coff-exports %t.2.dll | FileCheck %s
12 # RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -defsym drectve=1 %s -o %t.drectve.obj
13 # RUN: lld-link -entry:dllmain -dll %t.drectve.obj -out:%t.3.dll
14 # RUN: llvm-readobj --coff-exports %t.3.dll | FileCheck %s
16 # CHECK: Name: foo.bar
18 .text
19 .globl dllmain
20 .globl foo.bar
21 dllmain:
22 ret
23 foo.bar:
24 ret
26 .if drectve==1
27 .section .drectve
28 .ascii "-export:foo.bar"
29 .endif