1 ; RUN: llc -mtriple x86_64-pc-win32 < %s | FileCheck -check-prefix=CHECK -check-prefix=WIN32 %s
2 ; RUN: llc -mtriple x86_64-pc-mingw32 < %s | FileCheck -check-prefix=CHECK -check-prefix=MINGW %s
6 define void @notExported() {
11 define dllexport void @f1() {
16 define dllexport void @f2() unnamed_addr {
21 define linkonce_odr dllexport void @lnk1() {
26 define linkonce_odr dllexport void @lnk2() alwaysinline {
31 define weak_odr dllexport void @weak1() {
38 @Var1 = dllexport global i32 1, align 4
42 @Var2 = dllexport unnamed_addr constant i32 1
45 @Var3 = common dllexport global i32 0, align 4
47 ; CHECK: .globl WeakVar1
48 @WeakVar1 = weak_odr dllexport global i32 1, align 4
50 ; CHECK: .globl WeakVar2
51 @WeakVar2 = weak_odr dllexport unnamed_addr constant i32 1
55 ; CHECK: alias = notExported
56 @alias = dllexport alias void()* @notExported
58 ; CHECK: .globl alias2
60 @alias2 = dllexport alias void()* @f1
62 ; CHECK: .globl alias3
63 ; CHECK: alias3 = notExported
64 @alias3 = dllexport alias void()* @notExported
66 ; CHECK: .weak weak_alias
67 ; CHECK: weak_alias = f1
68 @weak_alias = weak_odr dllexport alias void()* @f1
70 @blob = global [6 x i8] c"\B8*\00\00\00\C3", section ".text", align 16
71 @blob_alias = dllexport alias bitcast ([6 x i8]* @blob to i32 ()*)
73 ; CHECK: .section .drectve
74 ; WIN32: " /EXPORT:Var1,DATA"
75 ; WIN32: " /EXPORT:Var2,DATA"
76 ; WIN32: " /EXPORT:Var3,DATA"
77 ; WIN32: " /EXPORT:WeakVar1,DATA"
78 ; WIN32: " /EXPORT:WeakVar2,DATA"
79 ; WIN32: " /EXPORT:f1"
80 ; WIN32: " /EXPORT:f2"
81 ; WIN32: " /EXPORT:lnk1"
82 ; WIN32: " /EXPORT:lnk2"
83 ; WIN32: " /EXPORT:weak1"
84 ; WIN32: " /EXPORT:alias"
85 ; WIN32: " /EXPORT:alias2"
86 ; WIN32: " /EXPORT:alias3"
87 ; WIN32: " /EXPORT:weak_alias"
88 ; WIN32: " /EXPORT:blob_alias"
89 ; MINGW: " -export:Var1,data"
90 ; MINGW: " -export:Var2,data"
91 ; MINGW: " -export:Var3,data"
92 ; MINGW: " -export:WeakVar1,data"
93 ; MINGW: " -export:WeakVar2,data"
94 ; MINGW: " -export:f1"
95 ; MINGW: " -export:f2"
96 ; MINGW: " -export:lnk1"
97 ; MINGW: " -export:lnk2"
98 ; MINGW: " -export:weak1"
99 ; MINGW: " -export:alias"
100 ; MINGW: " -export:alias2"
101 ; MINGW: " -export:alias3"
102 ; MINGW: " -export:weak_alias"
103 ; MINGW: " -export:blob_alias"