Files
swift-mirror/lib/IRGen/GenCoro.h
Nate Chandler 76881b1d52 [CoroutineAccessors] Add frame de/alloc functions.
To enable ABIs which store extra info in the frame, add two new slots to
the coroutine allocator function table.  For example, a frame could have
a header containing a context pointer at a negative offset from the
address returned from `swift_coro_alloc_frame`.  The frame deallocation
function would then know to deallocate more space correspondingly.
2025-10-22 21:00:17 -07:00

29 lines
983 B
C++

//===----- GenCoro.h - Code generation related to coroutines --------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
namespace swift {
namespace irgen {
class IRGenModule;
llvm::Constant *getCoroAllocFn(IRGenModule &IGM);
llvm::Constant *getCoroAllocFrameFn(IRGenModule &IGM);
llvm::Constant *getCoroDeallocFn(IRGenModule &IGM);
llvm::Constant *getCoroDeallocFrameFn(IRGenModule &IGM);
llvm::Value *
emitYieldOnce2CoroutineAllocator(IRGenFunction &IGF,
std::optional<CoroAllocatorKind> kind);
} // end namespace irgen
} // end namespace swift