mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
IRGen: Add force import thunk to used globals on windows
LLVM's new pass pipeline will otherwise remove the internal symbol.
This commit is contained in:
@@ -1619,6 +1619,7 @@ static llvm::GlobalObject *createForceImportThunk(IRGenModule &IGM) {
|
||||
auto BB = llvm::BasicBlock::Create(IGM.getLLVMContext(), "", ForceImportThunk);
|
||||
llvm::IRBuilder<> IRB(BB);
|
||||
IRB.CreateRetVoid();
|
||||
IGM.addUsedGlobal(ForceImportThunk);
|
||||
return ForceImportThunk;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user