Skip to content

Commit 27731bd

Browse files
committed
IRGen: Another fix for compiling LLVM opaque pointers
Use the signature to get the function type when getting Swift function pointer callees. This is okay because there is a previous call to cast to that type using the Signature
1 parent 0f25f02 commit 27731bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/IRGen/GenCall.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5145,7 +5145,8 @@ Callee irgen::getSwiftFunctionPointerCallee(
51455145
PointerAuthInfo::forFunctionPointer(IGF.IGM, calleeInfo.OrigFnType);
51465146

51475147
auto fn = isClosure ? FunctionPointer::createSignedClosure(calleeInfo.OrigFnType, fnPtr, authInfo, sig) :
5148-
FunctionPointer::createSigned(calleeInfo.OrigFnType, fnPtr, authInfo, sig);
5148+
FunctionPointer::createSigned(calleeInfo.OrigFnType, fnPtr, authInfo, sig,
5149+
true);
51495150
if (castOpaqueToRefcountedContext) {
51505151
assert(dataPtr && dataPtr->getType() == IGF.IGM.OpaquePtrTy &&
51515152
"Expecting trivial closure context");

0 commit comments

Comments
 (0)