Skip to content

Commit 01eebe1

Browse files
committed
Fix for release/5.5
5.5 doesn't have any `get*Type()` interfaces, so have to get the types through some other means.
1 parent 863bfb6 commit 01eebe1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/SIL/IR/TypeLowering.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2572,7 +2572,8 @@ static CanAnyFunctionType getAsyncEntryPoint(ASTContext &C) {
25722572
// This generates the type signature for @async_main
25732573
// TODO: 'Never' return type would be more accurate.
25742574

2575-
CanType returnType = C.getVoidType()->getCanonicalType();
2575+
CanType returnType =
2576+
C.getVoidDecl()->getDeclaredInterfaceType()->getCanonicalType();
25762577
FunctionType::ExtInfo extInfo =
25772578
FunctionType::ExtInfoBuilder().withAsync(true).withThrows(false).build();
25782579
return CanAnyFunctionType::get(/*genericSig*/ nullptr, {}, returnType,

lib/SILGen/SILGenFunction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -938,9 +938,9 @@ void SILGenFunction::emitAsyncMainThreadStart(SILDeclRef entryPoint) {
938938
// Emit the CreateAsyncTask builtin
939939
TaskCreateFlags taskCreationFlagMask(0);
940940
taskCreationFlagMask.setInheritContext(true);
941-
SILValue taskFlags =
942-
emitWrapIntegerLiteral(moduleLoc, getLoweredType(ctx.getIntType()),
943-
taskCreationFlagMask.getOpaqueValue());
941+
SILValue taskFlags = emitWrapIntegerLiteral(
942+
moduleLoc, getLoweredType(ctx.getIntDecl()->getDeclaredInterfaceType()),
943+
taskCreationFlagMask.getOpaqueValue());
944944

945945
SILValue task =
946946
emitBuiltinCreateAsyncTask(*this, moduleLoc, subs,

0 commit comments

Comments
 (0)