mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
First cut of making coroutine AST type
This commit is contained in:
@@ -5730,8 +5730,13 @@ public:
|
||||
visitBuiltinTypeImpl(ty);
|
||||
}
|
||||
|
||||
void visitYieldResultType(const YieldResultType *) {
|
||||
llvm_unreachable("implemented me");
|
||||
void visitYieldResultType(const YieldResultType *ty) {
|
||||
using namespace decls_block;
|
||||
unsigned abbrCode = S.DeclTypeAbbrCodes[YieldResultTypeLayout::Code];
|
||||
|
||||
YieldResultTypeLayout::emitRecord(S.Out, S.ScratchRecord, abbrCode,
|
||||
S.addTypeRef(ty->getResultType()),
|
||||
ty->isInOut());
|
||||
}
|
||||
|
||||
void visitTypeAliasType(const TypeAliasType *alias) {
|
||||
@@ -6023,7 +6028,8 @@ public:
|
||||
S.addTypeRef(fnTy->getThrownError()),
|
||||
getRawStableDifferentiabilityKind(fnTy->getDifferentiabilityKind()),
|
||||
isolation,
|
||||
fnTy->hasSendingResult());
|
||||
fnTy->hasSendingResult(),
|
||||
fnTy->isCoroutine());
|
||||
|
||||
serializeFunctionTypeParams(fnTy);
|
||||
|
||||
@@ -6045,7 +6051,7 @@ public:
|
||||
fnTy->isSendable(), fnTy->isAsync(), fnTy->isThrowing(),
|
||||
S.addTypeRef(fnTy->getThrownError()),
|
||||
getRawStableDifferentiabilityKind(fnTy->getDifferentiabilityKind()),
|
||||
isolation, fnTy->hasSendingResult(),
|
||||
isolation, fnTy->hasSendingResult(), fnTy->isCoroutine(),
|
||||
S.addGenericSignatureRef(genericSig));
|
||||
|
||||
serializeFunctionTypeParams(fnTy);
|
||||
@@ -6483,6 +6489,8 @@ void Serializer::writeAllDeclsAndTypes() {
|
||||
|
||||
registerDeclTypeAbbr<ClangTypeLayout>();
|
||||
|
||||
registerDeclTypeAbbr<YieldResultTypeLayout>();
|
||||
|
||||
registerDeclTypeAbbr<TypeAliasLayout>();
|
||||
registerDeclTypeAbbr<GenericTypeParamTypeLayout>();
|
||||
registerDeclTypeAbbr<DependentMemberTypeLayout>();
|
||||
|
||||
Reference in New Issue
Block a user