llvm.org GIT mirror llvm / e72587b
Merging r228411: ------------------------------------------------------------------------ r228411 | rnk | 2015-02-06 09:59:49 -0800 (Fri, 06 Feb 2015) | 3 lines Don't dllexport declarations Fixes PR22488 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@228480 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 5 years ago
2 changed file(s) with 6 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
687687 std::vector DLLExportedFns, DLLExportedGlobals;
688688
689689 for (const auto &Function : M)
690 if (Function.hasDLLExportStorageClass())
690 if (Function.hasDLLExportStorageClass() && !Function.isDeclaration())
691691 DLLExportedFns.push_back(getSymbol(&Function));
692692
693693 for (const auto &Global : M.globals())
694 if (Global.hasDLLExportStorageClass())
694 if (Global.hasDLLExportStorageClass() && !Global.isDeclaration())
695695 DLLExportedGlobals.push_back(getSymbol(&Global));
696696
697697 for (const auto &Alias : M.aliases()) {
1919 define dllexport void @f2() unnamed_addr {
2020 ret void
2121 }
22
23 declare dllexport void @not_defined()
2224
2325 ; CHECK: .globl _stdfun@0
2426 define dllexport x86_stdcallcc void @stdfun() nounwind {
9092 ; CHECK: _weak_alias = _f1
9193 @weak_alias = weak_odr dllexport alias void()* @f1
9294
93
9495 ; CHECK: .section .drectve
9596 ; CHECK-CL: " /EXPORT:_Var1,DATA"
9697 ; CHECK-CL: " /EXPORT:_Var2,DATA"
99100 ; CHECK-CL: " /EXPORT:_WeakVar2,DATA"
100101 ; CHECK-CL: " /EXPORT:_f1"
101102 ; CHECK-CL: " /EXPORT:_f2"
103 ; CHECK-CL-NOT: not_exported
102104 ; CHECK-CL: " /EXPORT:_stdfun@0"
103105 ; CHECK-CL: " /EXPORT:@fastfun@0"
104106 ; CHECK-CL: " /EXPORT:_thisfun"
116118 ; CHECK-GCC: " -export:WeakVar2,data"
117119 ; CHECK-GCC: " -export:f1"
118120 ; CHECK-GCC: " -export:f2"
121 ; CHECK-CL-NOT: not_exported
119122 ; CHECK-GCC: " -export:stdfun@0"
120123 ; CHECK-GCC: " -export:@fastfun@0"
121124 ; CHECK-GCC: " -export:thisfun"