Skip to content

Commit ffd9c76

Browse files
committed
IRGen: repair the IRGen on Windows
The cross-module reference must be indirected through the moral equivalent of the GOT - the IAT. This indirects through the import address table, permitting the pointer to be resolved.
1 parent 583d617 commit ffd9c76

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/IRGen/IRGenModule.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -899,9 +899,8 @@ llvm::Constant *swift::getRuntimeFn(llvm::Module &Module,
899899
}
900900

901901
llvm::Constant *IRGenModule::getDeletedAsyncMethodErrorAsyncFunctionPointer() {
902-
return getAddrOfLLVMVariable(
903-
LinkEntity::forKnownAsyncFunctionPointer("swift_deletedAsyncMethodError"),
904-
ConstantInit(), DebugTypeInfo());
902+
return getAddrOfLLVMVariableOrGOTEquivalent(
903+
LinkEntity::forKnownAsyncFunctionPointer("swift_deletedAsyncMethodError")).getValue();
905904
}
906905

907906
#define QUOTE(...) __VA_ARGS__

0 commit comments

Comments
 (0)