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