[clang-tidy][use-internal-linkage]fix false positives for global overloaded operator...
[llvm-project.git] / lld / test / COFF / dllexport.s
blobb04ebc3a33c3e2d1fbc40db0f8a5d946722b4b38
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=i686-windows-msvc %s -o %t.obj
4 # RUN: lld-link -safeseh:no -entry:dllmain -dll %t.obj -out:%t.dll -implib:%t.lib
5 # RUN: llvm-readobj %t.lib | FileCheck -check-prefix DECORATED-IMPLIB %s
6 # RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix DECORATED-EXPORTS %s
8 # DECORATED-IMPLIB: Name type: name
9 # DECORATED-IMPLIB-NEXT: Export name: @fastcall@8
10 # DECORATED-IMPLIB-NEXT: __imp_@fastcall@8
11 # DECORATED-IMPLIB-NEXT: @fastcall@8
12 # DECORATED-IMPLIB: Name type: name
13 # DECORATED-IMPLIB-NEXT: Export name: _stdcall@8
14 # DECORATED-IMPLIB-NEXT: __imp__stdcall@8
15 # DECORATED-IMPLIB-NEXT: _stdcall@8
16 # DECORATED-IMPLIB: Name type: noprefix
17 # DECORATED-IMPLIB-NEXT: Export name: _underscored
18 # DECORATED-IMPLIB-NEXT: __imp___underscored
19 # DECORATED-IMPLIB-NEXT: __underscored
20 # DECORATED-IMPLIB: Name type: name
21 # DECORATED-IMPLIB-NEXT: Export name: vectorcall@@8
22 # DECORATED-IMPLIB-NEXT: __imp_vectorcall@@8
23 # DECORATED-IMPLIB-NEXT: vectorcall@@8
25 # DECORATED-EXPORTS: Name: @fastcall@8
26 # DECORATED-EXPORTS: Name: _stdcall@8
27 # DECORATED-EXPORTS: Name: _underscored
28 # DECORATED-EXPORTS: Name: vectorcall@@8
30 .def _stdcall@8;
31 .scl 2;
32 .type 32;
33 .endef
34 .globl _stdcall@8
35 .globl @fastcall@8
36 .globl vectorcall@@8
37 .globl __underscored
38 _stdcall@8:
39 movl 8(%esp), %eax
40 addl 4(%esp), %eax
41 retl $8
42 @fastcall@8:
43 movl 8(%esp), %eax
44 addl 4(%esp), %eax
45 retl $8
46 vectorcall@@8:
47 movl 8(%esp), %eax
48 addl 4(%esp), %eax
49 retl $8
50 __underscored:
51 ret
53 .def _dllmain;
54 .scl 2;
55 .type 32;
56 .endef
57 .globl _dllmain
58 _dllmain:
59 retl
61 .section .drectve
62 .ascii "-export:__underscored -export:_stdcall@8 -export:@fastcall@8 -export:vectorcall@@8"