Skip to content

Commit 27347f7

Browse files
committed
Fix external linkage on windows
1 parent 387f2af commit 27347f7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/IRGen/GenFunc.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ namespace irgen {
7373
auto *size = parameters.claimNext();
7474
auto coroAllocPtr = IGF.IGM.getCoroFrameAllocFn();
7575
auto coroAllocFn = dyn_cast<llvm::Function>(coroAllocPtr);
76-
coroAllocFn->setLinkage(llvm::GlobalValue::ExternalWeakLinkage);
76+
if (!llvm::Triple(IGM.Triple).isOSWindows())
77+
coroAllocFn->setLinkage(llvm::GlobalValue::ExternalWeakLinkage);
7778
auto *coroFrameAllocFn = IGF.IGM.getOpaquePtr(coroAllocPtr);
7879
auto *nullSwiftCoroFrameAlloc = IGF.Builder.CreateCmp(
7980
llvm::CmpInst::Predicate::ICMP_NE, coroFrameAllocFn,

0 commit comments

Comments
 (0)