@@ -542,7 +542,6 @@ struct ASTContext::Implementation {
542542 llvm::DenseMap<Type, VariadicSequenceType*> VariadicSequenceTypes;
543543 llvm::DenseMap<std::pair<Type, Type>, DictionaryType *> DictionaryTypes;
544544 llvm::DenseMap<Type, OptionalType*> OptionalTypes;
545- llvm::DenseMap<Type, ParenType*> ParenTypes;
546545 llvm::DenseMap<uintptr_t , ReferenceStorageType*> ReferenceStorageTypes;
547546 llvm::DenseMap<Type, LValueType*> LValueTypes;
548547 llvm::DenseMap<Type, InOutType*> InOutTypes;
@@ -3240,7 +3239,6 @@ size_t ASTContext::Implementation::Arena::getTotalMemory() const {
32403239 llvm::capacity_in_bytes (DictionaryTypes) +
32413240 llvm::capacity_in_bytes (OptionalTypes) +
32423241 llvm::capacity_in_bytes (VariadicSequenceTypes) +
3243- llvm::capacity_in_bytes (ParenTypes) +
32443242 llvm::capacity_in_bytes (ReferenceStorageTypes) +
32453243 llvm::capacity_in_bytes (LValueTypes) +
32463244 llvm::capacity_in_bytes (InOutTypes) +
@@ -3279,7 +3277,6 @@ void ASTContext::Implementation::Arena::dump(llvm::raw_ostream &os) const {
32793277 SIZE_AND_BYTES (VariadicSequenceTypes);
32803278 SIZE_AND_BYTES (DictionaryTypes);
32813279 SIZE_AND_BYTES (OptionalTypes);
3282- SIZE_AND_BYTES (ParenTypes);
32833280 SIZE_AND_BYTES (ReferenceStorageTypes);
32843281 SIZE_AND_BYTES (LValueTypes);
32853282 SIZE_AND_BYTES (InOutTypes);
@@ -3629,18 +3626,6 @@ BuiltinVectorType *BuiltinVectorType::get(const ASTContext &context,
36293626 return vecTy;
36303627}
36313628
3632- ParenType *ParenType::get (const ASTContext &C, Type underlying) {
3633- auto properties = underlying->getRecursiveProperties ();
3634- auto arena = getArena (properties);
3635- ParenType *&Result = C.getImpl ().getArena (arena).ParenTypes [underlying];
3636- if (Result == nullptr ) {
3637- Result = new (C, arena) ParenType (underlying, properties);
3638- assert ((C.hadError () || !underlying->is <InOutType>()) &&
3639- " Cannot wrap InOutType" );
3640- }
3641- return Result;
3642- }
3643-
36443629CanTupleType TupleType::getEmpty (const ASTContext &C) {
36453630 return cast<TupleType>(CanType (C.TheEmptyTupleType ));
36463631}
@@ -4567,7 +4552,7 @@ Type AnyFunctionType::composeTuple(ASTContext &ctx, ArrayRef<Param> params,
45674552 elements.emplace_back (param.getParameterType (), param.getLabel ());
45684553 }
45694554 if (elements.size () == 1 && !elements[0 ].hasName ())
4570- return ParenType::get (ctx, elements[0 ].getType () );
4555+ return elements[0 ].getType ();
45714556 return TupleType::get (elements, ctx);
45724557}
45734558
0 commit comments