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:
@@ -973,10 +973,9 @@ static SILValue getBinaryFunction(StringRef Name, SILType IntSILTy,
|
||||
|
||||
// Woo, boilerplate to produce a function type.
|
||||
auto extInfo = SILFunctionType::ExtInfo(AbstractCC::Freestanding,
|
||||
/*thin*/ true,
|
||||
FunctionType::Representation::Thin,
|
||||
/*noreturn*/ false,
|
||||
/*autoclosure*/ false,
|
||||
/*block*/ false);
|
||||
/*autoclosure*/ false);
|
||||
|
||||
SILParameterInfo Params[] = {
|
||||
SILParameterInfo(IntTy, ParameterConvention::Direct_Unowned),
|
||||
@@ -1002,10 +1001,9 @@ static SILValue getTruncateToI1Function(SILType IntSILTy, SILLocation Loc,
|
||||
|
||||
// Woo, boilerplate to produce a function type.
|
||||
auto extInfo = SILFunctionType::ExtInfo(AbstractCC::Freestanding,
|
||||
/*thin*/ true,
|
||||
FunctionType::Representation::Thin,
|
||||
/*noreturn*/ false,
|
||||
/*autoclosure*/ false,
|
||||
/*block*/ false);
|
||||
/*autoclosure*/ false);
|
||||
|
||||
SILParameterInfo Param(IntTy, ParameterConvention::Direct_Unowned);
|
||||
Type Int1Ty = BuiltinIntegerType::get(1, B.getASTContext());
|
||||
|
||||
Reference in New Issue
Block a user