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:
@@ -299,7 +299,8 @@ SILDeclRef SILGenModule::getUnsafePointerToObjCMutablePointerFn() {
|
||||
|
||||
SILFunction *SILGenModule::emitTopLevelFunction(SILLocation Loc) {
|
||||
ASTContext &C = M.getASTContext();
|
||||
auto extInfo = FunctionType::ExtInfo().withIsThin(true);
|
||||
auto extInfo = FunctionType::ExtInfo()
|
||||
.withRepresentation(FunctionType::Representation::Thin);
|
||||
Type topLevelType = FunctionType::get(TupleType::getEmpty(C),
|
||||
TupleType::getEmpty(C),
|
||||
extInfo);
|
||||
@@ -633,9 +634,10 @@ void SILGenModule::emitDefaultArgGenerator(SILDeclRef constant, Expr *arg) {
|
||||
SILFunction *SILGenModule::emitLazyGlobalInitializer(StringRef funcName,
|
||||
PatternBindingDecl *binding) {
|
||||
ASTContext &C = M.getASTContext();
|
||||
Type initType = FunctionType::get(TupleType::getEmpty(C),
|
||||
TupleType::getEmpty(C),
|
||||
FunctionType::ExtInfo().withIsThin(true));
|
||||
Type initType = FunctionType::get(
|
||||
TupleType::getEmpty(C), TupleType::getEmpty(C),
|
||||
FunctionType::ExtInfo()
|
||||
.withRepresentation(FunctionType::Representation::Thin));
|
||||
auto initSILType = getLoweredType(initType).castTo<SILFunctionType>();
|
||||
|
||||
auto *f =
|
||||
|
||||
Reference in New Issue
Block a user