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 3 4; CHECK: .text 5 6define void @notExported() { 7 ret void 8} 9 10; CHECK: .globl f1 11define dllexport void @f1() { 12 ret void 13} 14 15; CHECK: .globl f2 16define dllexport void @f2() unnamed_addr { 17 ret void 18} 19 20; CHECK: .globl lnk1 21define linkonce_odr dllexport void @lnk1() { 22 ret void 23} 24 25; CHECK: .globl lnk2 26define linkonce_odr dllexport void @lnk2() alwaysinline { 27 ret void 28} 29 30; CHECK: .globl weak1 31define weak_odr dllexport void @weak1() { 32 ret void 33} 34 35 36; CHECK: .data 37; CHECK: .globl Var1 38@Var1 = dllexport global i32 1, align 4 39 40; CHECK: .rdata,"dr" 41; CHECK: .globl Var2 42@Var2 = dllexport unnamed_addr constant i32 1 43 44; CHECK: .comm Var3 45@Var3 = common dllexport global i32 0, align 4 46 47; CHECK: .globl WeakVar1 48@WeakVar1 = weak_odr dllexport global i32 1, align 4 49 50; CHECK: .globl WeakVar2 51@WeakVar2 = weak_odr dllexport unnamed_addr constant i32 1 52 53 54; CHECK: .globl alias 55; CHECK: alias = notExported 56@alias = dllexport alias void()* @notExported 57 58; CHECK: .globl alias2 59; CHECK: alias2 = f1 60@alias2 = dllexport alias void()* @f1 61 62; CHECK: .globl alias3 63; CHECK: alias3 = notExported 64@alias3 = dllexport alias void()* @notExported 65 66; CHECK: .weak weak_alias 67; CHECK: weak_alias = f1 68@weak_alias = weak_odr dllexport alias void()* @f1 69 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 ()*) 72 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" 104