[CoroutineAccessors] Directly reference allocators

Replace the call to a runtime function that looks up the allocator with
a direct reference to a just-emittedd sought-after global allocator.
This commit is contained in:
Nate Chandler
2025-03-24 16:27:07 -07:00
parent 9fcd15108b
commit 0c2a38b10b
12 changed files with 478 additions and 71 deletions

View File

@@ -832,8 +832,8 @@ IRGenModule::IRGenModule(IRGenerator &irgen,
CoroAllocatorTy = createStructType(*this, "swift.coro_allocator",
{
Int32Ty, // CoroAllocator.Flags
CoroAllocateFnTy,
CoroDeallocateFnTy,
CoroAllocateFnTy->getPointerTo(),
CoroDeallocateFnTy->getPointerTo(),
});
CoroAllocatorPtrTy = CoroAllocatorTy->getPointerTo();
}