Home | History | Annotate | Download | only in X86
      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 
      6 define void @notExported() {
      7 	ret void
      8 }
      9 
     10 ; CHECK: .globl f1
     11 define dllexport void @f1() {
     12 	ret void
     13 }
     14 
     15 ; CHECK: .globl f2
     16 define dllexport void @f2() unnamed_addr {
     17 	ret void
     18 }
     19 
     20 ; CHECK: .globl lnk1
     21 define linkonce_odr dllexport void @lnk1() {
     22 	ret void
     23 }
     24 
     25 ; CHECK: .globl lnk2
     26 define linkonce_odr dllexport void @lnk2() alwaysinline {
     27 	ret void
     28 }
     29 
     30 ; CHECK: .globl weak1
     31 define 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(), void()* @notExported
     57 
     58 ; CHECK: .globl alias2
     59 ; CHECK: alias2 = f1
     60 @alias2 = dllexport alias void(), void()* @f1
     61 
     62 ; CHECK: .globl alias3
     63 ; CHECK: alias3 = notExported
     64 @alias3 = dllexport alias void(), void()* @notExported
     65 
     66 ; CHECK: .weak weak_alias
     67 ; CHECK: weak_alias = f1
     68 @weak_alias = weak_odr dllexport alias void(), void()* @f1
     69 
     70 @blob = global [6 x i8] c"\B8*\00\00\00\C3", section ".text", align 16
     71 @blob_alias = dllexport alias i32 (), bitcast ([6 x i8]* @blob to i32 ()*)
     72 
     73 ; CHECK: .section .drectve
     74 ; WIN32: /EXPORT:f1
     75 ; WIN32-SAME: /EXPORT:f2
     76 ; WIN32-SAME: /EXPORT:lnk1
     77 ; WIN32-SAME: /EXPORT:lnk2
     78 ; WIN32-SAME: /EXPORT:weak1
     79 ; WIN32-SAME: /EXPORT:Var1,DATA
     80 ; WIN32-SAME: /EXPORT:Var2,DATA
     81 ; WIN32-SAME: /EXPORT:Var3,DATA
     82 ; WIN32-SAME: /EXPORT:WeakVar1,DATA
     83 ; WIN32-SAME: /EXPORT:WeakVar2,DATA
     84 ; WIN32-SAME: /EXPORT:alias
     85 ; WIN32-SAME: /EXPORT:alias2
     86 ; WIN32-SAME: /EXPORT:alias3
     87 ; WIN32-SAME: /EXPORT:weak_alias
     88 ; WIN32-SAME: /EXPORT:blob_alias
     89 ; MINGW: -export:f1
     90 ; MINGW-SAME: -export:f2
     91 ; MINGW-SAME: -export:lnk1
     92 ; MINGW-SAME: -export:lnk2
     93 ; MINGW-SAME: -export:weak1
     94 ; MINGW-SAME: -export:Var1,data
     95 ; MINGW-SAME: -export:Var2,data
     96 ; MINGW-SAME: -export:Var3,data
     97 ; MINGW-SAME: -export:WeakVar1,data
     98 ; MINGW-SAME: -export:WeakVar2,data
     99 ; MINGW-SAME: -export:alias
    100 ; MINGW-SAME: -export:alias2
    101 ; MINGW-SAME: -export:alias3
    102 ; MINGW-SAME: -export:weak_alias
    103 ; MINGW-SAME: -export:blob_alias"
    104