2010-02-17 02:27:26 +08:00
|
|
|
// RUN: %clang_cc1 -triple i386-mingw32 -emit-llvm < %s | FileCheck %s
|
2008-12-26 08:52:02 +08:00
|
|
|
|
2014-01-14 23:23:53 +08:00
|
|
|
__attribute__((dllexport)) int bar1 = 2;
|
|
|
|
// CHECK-LABEL: @bar1 = dllexport global i32 2
|
|
|
|
__attribute__((dllimport)) extern int bar2;
|
|
|
|
// CHECK-LABEL: @bar2 = external dllimport global i32
|
|
|
|
|
2008-12-26 08:52:02 +08:00
|
|
|
void __attribute__((dllimport)) foo1();
|
|
|
|
void __attribute__((dllexport)) foo1(){}
|
2013-08-15 14:47:53 +08:00
|
|
|
// CHECK-LABEL: define dllexport void @foo1
|
2008-12-26 08:52:02 +08:00
|
|
|
void __attribute__((dllexport)) foo2();
|
2010-02-17 02:27:26 +08:00
|
|
|
|
|
|
|
// PR6269
|
|
|
|
__declspec(dllimport) void foo3();
|
|
|
|
__declspec(dllexport) void foo3(){}
|
2013-08-15 14:47:53 +08:00
|
|
|
// CHECK-LABEL: define dllexport void @foo3
|
2010-02-17 02:27:26 +08:00
|
|
|
__declspec(dllexport) void foo4();
|
2014-01-14 23:23:53 +08:00
|
|
|
|
|
|
|
__declspec(dllimport) void foo5();
|
|
|
|
// CHECK-LABEL: declare dllimport void @foo5
|
|
|
|
|
|
|
|
int use() { foo5(); return bar2; }
|