mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fold ExtInfo::isThin and ::isBlock into a "Representation" enum.
These bits are orthogonal to each other, so combine them into one, and diagnose attempts to produce a type that's both. Spot-fix a bunch of places this revealed by inspection that we would have crashed in SILGen or IRGen if blocks were be handled. Swift SVN r16088
This commit is contained in:
@@ -580,7 +580,16 @@ namespace {
|
||||
void visitSILFunctionType(CanSILFunctionType origTy,
|
||||
CanSILFunctionType substTy) {
|
||||
checkFunctionsAreCompatible(IGF.IGM, origTy, substTy);
|
||||
In.transferInto(Out, 1 + (origTy->isThin() ? 0 : 1));
|
||||
|
||||
switch (origTy->getRepresentation()) {
|
||||
case AnyFunctionType::Representation::Block:
|
||||
case AnyFunctionType::Representation::Thin:
|
||||
In.transferInto(Out, 1);
|
||||
break;
|
||||
case AnyFunctionType::Representation::Thick:
|
||||
In.transferInto(Out, 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void visitLValueType(CanLValueType origTy, CanLValueType substTy) {
|
||||
|
||||
Reference in New Issue
Block a user