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
4define void @f() {
5  ret void
6}
7
8define dllexport void @g() {
9  ret void
10}
11
12define dllexport void @h() unnamed_addr {
13  ret void
14}
15
16declare dllexport void @i()
17
18define linkonce_odr dllexport void @j() {
19  ret void
20}
21
22define linkonce_odr dllexport void @k() alwaysinline {
23  ret void
24}
25
26define weak_odr dllexport void @l() {
27  ret void
28}
29
30@m = dllexport global i32 0, align 4
31@n = dllexport unnamed_addr constant i32 0
32@o = common dllexport global i32 0, align 4
33@p = weak_odr dllexport global i32 0, align 4
34@q = weak_odr dllexport unnamed_addr constant i32 0
35
36@r = dllexport alias void (), void () * @f
37@s = dllexport alias void (), void () * @g
38@t = dllexport alias void (), void () * @f
39@u = weak_odr dllexport alias void (), void () * @g
40
41; CHECK: .section .drectve
42; CHECK-GNU-NOT: -export:f
43; CHECK-GNU: .ascii " -export:g"
44; CHECK-GNU: .ascii " -export:h"
45; CHECK-GNU-NOT: -export:i
46; CHECK-GNU: .ascii " -export:j"
47; CHECK-GNU: .ascii " -export:k"
48; CHECK-GNU: .ascii " -export:l"
49; CHECK-GNU: .ascii " -export:m,data"
50; CHECK-GNU: .ascii " -export:n,data"
51; CHECK-GNU: .ascii " -export:o,data"
52; CHECK-GNU: .ascii " -export:p,data"
53; CHECK-GNU: .ascii " -export:q,data"
54; CHECK-GNU: .ascii " -export:r"
55; CHECK-GNU: .ascii " -export:s"
56; CHECK-GNU: .ascii " -export:t"
57; CHECK-GNU: .ascii " -export:u"
58; CHECK-MSVC-NOT: /EXPORT:f
59; CHECK-MSVC: .ascii "  /EXPORT:g"
60; CHECK-MSVC: .ascii "  /EXPORT:h"
61; CHECK-MSVC-NOT: /EXPORT:i
62; CHECK-MSVC: .ascii "  /EXPORT:j"
63; CHECK-MSVC: .ascii "  /EXPORT:k"
64; CHECK-MSVC: .ascii "  /EXPORT:l"
65; CHECK-MSVC: .ascii "  /EXPORT:m,DATA"
66; CHECK-MSVC: .ascii "  /EXPORT:n,DATA"
67; CHECK-MSVC: .ascii "  /EXPORT:o,DATA"
68; CHECK-MSVC: .ascii "  /EXPORT:p,DATA"
69; CHECK-MSVC: .ascii "  /EXPORT:q,DATA"
70; CHECK-MSVC: .ascii "  /EXPORT:r"
71; CHECK-MSVC: .ascii "  /EXPORT:s"
72; CHECK-MSVC: .ascii "  /EXPORT:t"
73; CHECK-MSVC: .ascii "  /EXPORT:u"
74