mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[NFC] IRGen: Vend a FunctionPointer of this helper
This commit is contained in:
@@ -904,6 +904,13 @@ llvm::Constant *irgen::getCoroFrameAllocStubFn(IRGenModule &IGM) {
|
||||
/*optionalLinkageOverride=*/nullptr, llvm::CallingConv::C);
|
||||
}
|
||||
|
||||
FunctionPointer irgen::getCoroFrameAllocStubFunctionPointer(IRGenModule &IGM) {
|
||||
auto *fn = cast<llvm::Function>(getCoroFrameAllocStubFn(IGM));
|
||||
auto sig = Signature::forFunction(fn);
|
||||
return FunctionPointer::forDirect(FunctionPointerKind::Function, fn, nullptr,
|
||||
sig);
|
||||
}
|
||||
|
||||
static Size getOffsetOfOpaqueIsolationField(IRGenModule &IGM,
|
||||
const LoadableTypeInfo &isolationTI) {
|
||||
auto offset = IGM.RefCountedStructSize;
|
||||
|
||||
@@ -65,6 +65,7 @@ namespace irgen {
|
||||
/// Stub function that weakly links againt the swift_coroFrameAlloc
|
||||
/// function. This is required for back-deployment.
|
||||
llvm::Constant *getCoroFrameAllocStubFn(IRGenModule &IGM);
|
||||
FunctionPointer getCoroFrameAllocStubFunctionPointer(IRGenModule &IGM);
|
||||
} // end namespace irgen
|
||||
} // end namespace swift
|
||||
|
||||
|
||||
Reference in New Issue
Block a user