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: .section .text,"xr",discard,lnk1 21; CHECK: .globl lnk1 22define linkonce_odr dllexport void @lnk1() { 23 ret void 24} 25 26; CHECK: .section .text,"xr",discard,lnk2 27; CHECK: .globl lnk2 28define linkonce_odr dllexport void @lnk2() alwaysinline { 29 ret void 30} 31 32; CHECK: .section .text,"xr",discard,weak1 33; CHECK: .globl weak1 34define weak_odr dllexport void @weak1() { 35 ret void 36} 37 38 39; CHECK: .data 40; CHECK: .globl Var1 41@Var1 = dllexport global i32 1, align 4 42 43; CHECK: .rdata,"rd" 44; CHECK: .globl Var2 45@Var2 = dllexport unnamed_addr constant i32 1 46 47; CHECK: .comm Var3 48@Var3 = common dllexport global i32 0, align 4 49 50; CHECK: .section .data,"wd",discard,WeakVar1 51; CHECK: .globl WeakVar1 52@WeakVar1 = weak_odr dllexport global i32 1, align 4 53 54; CHECK: .section .rdata,"rd",discard,WeakVar2 55; CHECK: .globl WeakVar2 56@WeakVar2 = weak_odr dllexport unnamed_addr constant i32 1 57 58 59; CHECK: .globl alias 60; CHECK: alias = notExported 61@alias = dllexport alias void()* @notExported 62 63; CHECK: .globl alias2 64; CHECK: alias2 = f1 65@alias2 = dllexport alias void()* @f1 66 67; CHECK: .globl alias3 68; CHECK: alias3 = notExported 69@alias3 = dllexport alias void()* @notExported 70 71; CHECK: .weak weak_alias 72; CHECK: weak_alias = f1 73@weak_alias = dllexport alias weak_odr void()* @f1 74 75@blob = global [6 x i8] c"\B8*\00\00\00\C3", section ".text", align 16 76@blob_alias = dllexport alias bitcast ([6 x i8]* @blob to i32 ()*) 77 78; CHECK: .section .drectve 79; WIN32: " /EXPORT:Var1,DATA" 80; WIN32: " /EXPORT:Var2,DATA" 81; WIN32: " /EXPORT:Var3,DATA" 82; WIN32: " /EXPORT:WeakVar1,DATA" 83; WIN32: " /EXPORT:WeakVar2,DATA" 84; WIN32: " /EXPORT:f1" 85; WIN32: " /EXPORT:f2" 86; WIN32: " /EXPORT:lnk1" 87; WIN32: " /EXPORT:lnk2" 88; WIN32: " /EXPORT:weak1" 89; WIN32: " /EXPORT:alias" 90; WIN32: " /EXPORT:alias2" 91; WIN32: " /EXPORT:alias3" 92; WIN32: " /EXPORT:weak_alias" 93; WIN32: " /EXPORT:blob_alias" 94; MINGW: " -export:Var1,data" 95; MINGW: " -export:Var2,data" 96; MINGW: " -export:Var3,data" 97; MINGW: " -export:WeakVar1,data" 98; MINGW: " -export:WeakVar2,data" 99; MINGW: " -export:f1" 100; MINGW: " -export:f2" 101; MINGW: " -export:lnk1" 102; MINGW: " -export:lnk2" 103; MINGW: " -export:weak1" 104; MINGW: " -export:alias" 105; MINGW: " -export:alias2" 106; MINGW: " -export:alias3" 107; MINGW: " -export:weak_alias" 108; MINGW: " -export:blob_alias" 109