@@ -431,7 +431,6 @@ struct ASTContext::Implementation {
431
431
llvm::DenseMap<Type, InOutType*> InOutTypes;
432
432
llvm::DenseMap<std::pair<Type, void *>, DependentMemberType *>
433
433
DependentMemberTypes;
434
- llvm::DenseMap<void *, PlaceholderType *> PlaceholderTypes;
435
434
llvm::DenseMap<Type, DynamicSelfType *> DynamicSelfTypes;
436
435
llvm::DenseMap<std::pair<EnumDecl*, Type>, EnumType*> EnumTypes;
437
436
llvm::DenseMap<std::pair<StructDecl*, Type>, StructType*> StructTypes;
@@ -3126,27 +3125,8 @@ Type ErrorType::get(Type originalType) {
3126
3125
3127
3126
Type PlaceholderType::get (ASTContext &ctx, Originator originator) {
3128
3127
assert (originator);
3129
-
3130
- auto hasTypeVariables = [&]() -> bool {
3131
- if (originator.is <TypeVariableType *>())
3132
- return true ;
3133
-
3134
- if (auto *depTy = originator.dyn_cast <DependentMemberType *>())
3135
- return depTy->hasTypeVariable ();
3136
-
3137
- return false ;
3138
- }();
3139
- auto arena = hasTypeVariables ? AllocationArena::ConstraintSolver
3140
- : AllocationArena::Permanent;
3141
-
3142
- auto &cache = ctx.getImpl ().getArena (arena).PlaceholderTypes ;
3143
- auto &entry = cache[originator.getOpaqueValue ()];
3144
- if (entry)
3145
- return entry;
3146
-
3147
- entry = new (ctx, arena)
3128
+ return new (ctx, AllocationArena::Permanent)
3148
3129
PlaceholderType (ctx, originator, RecursiveTypeProperties::HasPlaceholder);
3149
- return entry;
3150
3130
}
3151
3131
3152
3132
BuiltinIntegerType *BuiltinIntegerType::get (BuiltinIntegerWidth BitWidth,
0 commit comments