1 ; RUN: llc -mtriple aarch64-windows-gnu -filetype asm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-GNU
2 ; RUN: llc -mtriple aarch64-windows-msvc -filetype asm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-MSVC
3 ; RUN: llc -mtriple arm64ec-windows-gnu -filetype asm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-GNU-EC
4 ; RUN: llc -mtriple arm64ec-windows-msvc -filetype asm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-MSVC-EC
10 define dllexport void @g() {
14 define dllexport void @h() unnamed_addr {
18 declare dllexport void @i()
20 define linkonce_odr dllexport void @j() {
24 define linkonce_odr dllexport void @k() alwaysinline {
28 define weak_odr dllexport void @l() {
32 @m = dllexport global i32 0, align 4
33 @n = dllexport unnamed_addr constant i32 0
34 @o = common dllexport global i32 0, align 4
35 @p = weak_odr dllexport global i32 0, align 4
36 @q = weak_odr dllexport unnamed_addr constant i32 0
38 @r = dllexport alias void (), ptr @f
39 @s = dllexport alias void (), ptr @g
40 @t = dllexport alias void (), ptr @f
41 @u = weak_odr dllexport alias void (), ptr @g
43 ; CHECK: .section .drectve
44 ; CHECK-GNU-NOT: -export:f
45 ; CHECK-GNU: .ascii " -export:g"
46 ; CHECK-GNU: .ascii " -export:h"
47 ; CHECK-GNU-NOT: -export:i
48 ; CHECK-GNU: .ascii " -export:j"
49 ; CHECK-GNU: .ascii " -export:k"
50 ; CHECK-GNU: .ascii " -export:l"
51 ; CHECK-GNU: .ascii " -export:m,data"
52 ; CHECK-GNU: .ascii " -export:n,data"
53 ; CHECK-GNU: .ascii " -export:o,data"
54 ; CHECK-GNU: .ascii " -export:p,data"
55 ; CHECK-GNU: .ascii " -export:q,data"
56 ; CHECK-GNU: .ascii " -export:r"
57 ; CHECK-GNU: .ascii " -export:s"
58 ; CHECK-GNU: .ascii " -export:t"
59 ; CHECK-GNU: .ascii " -export:u"
60 ; CHECK-MSVC-NOT: /EXPORT:f
61 ; CHECK-MSVC: .ascii " /EXPORT:g"
62 ; CHECK-MSVC: .ascii " /EXPORT:h"
63 ; CHECK-MSVC-NOT: /EXPORT:i
64 ; CHECK-MSVC: .ascii " /EXPORT:j"
65 ; CHECK-MSVC: .ascii " /EXPORT:k"
66 ; CHECK-MSVC: .ascii " /EXPORT:l"
67 ; CHECK-MSVC: .ascii " /EXPORT:m,DATA"
68 ; CHECK-MSVC: .ascii " /EXPORT:n,DATA"
69 ; CHECK-MSVC: .ascii " /EXPORT:o,DATA"
70 ; CHECK-MSVC: .ascii " /EXPORT:p,DATA"
71 ; CHECK-MSVC: .ascii " /EXPORT:q,DATA"
72 ; CHECK-MSVC: .ascii " /EXPORT:r"
73 ; CHECK-MSVC: .ascii " /EXPORT:s"
74 ; CHECK-MSVC: .ascii " /EXPORT:t"
75 ; CHECK-MSVC: .ascii " /EXPORT:u"
77 ; CHECK-GNU-EC-NOT: -export:f
78 ; CHECK-GNU-EC-NOT: -export:#f,EXPORTAS,f
79 ; CHECK-GNU-EC: .ascii " -export:#g,EXPORTAS,g
80 ; CHECK-GNU-EC: .ascii " -export:#h,EXPORTAS,h
81 ; CHECK-GNU-EC-NOT: -export:i
82 ; CHECK-GNU-EC-NOT: -export:#i,EXPORTAS,i
83 ; CHECK-GNU-EC: .ascii " -export:#j,EXPORTAS,j"
84 ; CHECK-GNU-EC: .ascii " -export:#k,EXPORTAS,k"
85 ; CHECK-GNU-EC: .ascii " -export:#l,EXPORTAS,l"
86 ; CHECK-GNU-EC: .ascii " -export:m,data"
87 ; CHECK-GNU-EC: .ascii " -export:n,data"
88 ; CHECK-GNU-EC: .ascii " -export:o,data"
89 ; CHECK-GNU-EC: .ascii " -export:p,data"
90 ; CHECK-GNU-EC: .ascii " -export:q,data"
91 ; CHECK-GNU-EC: .ascii " -export:r"
92 ; CHECK-GNU-EC: .ascii " -export:s"
93 ; CHECK-GNU-EC: .ascii " -export:t"
94 ; CHECK-GNU-EC: .ascii " -export:u"
95 ; CHECK-MSVC-EC-NOT: /EXPORT:f
96 ; CHECK-MSVC-EC-NOT: /EXPORT:#f,EXPORTAS,f
97 ; CHECK-MSVC-EC: .ascii " /EXPORT:#g,EXPORTAS,g"
98 ; CHECK-MSVC-EC: .ascii " /EXPORT:#h,EXPORTAS,h"
99 ; CHECK-MSVC-EC-NOT: /EXPORT:i
100 ; CHECK-MSVC-EC-NOT: /EXPORT:#i,EXPORTAS,i
101 ; CHECK-MSVC-EC: .ascii " /EXPORT:#j,EXPORTAS,j"
102 ; CHECK-MSVC-EC: .ascii " /EXPORT:#k,EXPORTAS,k"
103 ; CHECK-MSVC-EC: .ascii " /EXPORT:#l,EXPORTAS,l"
104 ; CHECK-MSVC-EC: .ascii " /EXPORT:m,DATA"
105 ; CHECK-MSVC-EC: .ascii " /EXPORT:n,DATA"
106 ; CHECK-MSVC-EC: .ascii " /EXPORT:o,DATA"
107 ; CHECK-MSVC-EC: .ascii " /EXPORT:p,DATA"
108 ; CHECK-MSVC-EC: .ascii " /EXPORT:q,DATA"
109 ; CHECK-MSVC-EC: .ascii " /EXPORT:r"
110 ; CHECK-MSVC-EC: .ascii " /EXPORT:s"
111 ; CHECK-MSVC-EC: .ascii " /EXPORT:t"
112 ; CHECK-MSVC-EC: .ascii " /EXPORT:u"