@@ -75,7 +75,7 @@ class GenericSignatureBuilder;
75
75
class Identifier;
76
76
class InOutType;
77
77
class OpaqueTypeDecl;
78
- class OpenedArchetypeType ;
78
+ class ExistentialArchetypeType ;
79
79
class PackExpansionType;
80
80
class PackType;
81
81
enum class ParamSpecifier : uint8_t;
@@ -114,6 +114,9 @@ enum class TypeKind : uint8_t {
114
114
#define TYPE_RANGE(Id, FirstId, LastId) \
115
115
First_##Id##Type = FirstId, Last_##Id##Type = LastId,
116
116
#include "swift/AST/TypeNodes.def"
117
+ // For backward compatibility in LLDB sources.
118
+ // TODO: remove this once OpenedArchetype is renamed in LLDB sources.
119
+ OpenedArchetype = ExistentialArchetype
117
120
};
118
121
119
122
enum : unsigned {
@@ -6971,16 +6974,16 @@ class LocalArchetypeType : public ArchetypeType {
6971
6974
6972
6975
public:
6973
6976
static bool classof(const TypeBase *type) {
6974
- return type->getKind() == TypeKind::OpenedArchetype ||
6977
+ return type->getKind() == TypeKind::ExistentialArchetype ||
6975
6978
type->getKind() == TypeKind::ElementArchetype;
6976
6979
}
6977
6980
};
6978
6981
BEGIN_CAN_TYPE_WRAPPER(LocalArchetypeType, ArchetypeType)
6979
6982
END_CAN_TYPE_WRAPPER(LocalArchetypeType, ArchetypeType)
6980
6983
6981
6984
/// An archetype that represents the dynamic type of an opened existential.
6982
- class OpenedArchetypeType final : public LocalArchetypeType,
6983
- private ArchetypeTrailingObjects<OpenedArchetypeType >
6985
+ class ExistentialArchetypeType final : public LocalArchetypeType,
6986
+ private ArchetypeTrailingObjects<ExistentialArchetypeType >
6984
6987
{
6985
6988
friend TrailingObjects;
6986
6989
friend ArchetypeType;
@@ -6991,7 +6994,7 @@ class OpenedArchetypeType final : public LocalArchetypeType,
6991
6994
///
6992
6995
/// This is only invoked by the generic environment when mapping the
6993
6996
/// interface type into context.
6994
- static CanTypeWrapper<OpenedArchetypeType >
6997
+ static CanTypeWrapper<ExistentialArchetypeType >
6995
6998
getNew(GenericEnvironment *environment, Type interfaceType,
6996
6999
ArrayRef<ProtocolDecl *> conformsTo, Type superclass,
6997
7000
LayoutConstraint layout);
@@ -7001,7 +7004,7 @@ class OpenedArchetypeType final : public LocalArchetypeType,
7001
7004
/// of an existential value.
7002
7005
///
7003
7006
/// \param existential The existential type to open.
7004
- static CanTypeWrapper<OpenedArchetypeType > get(CanType existential);
7007
+ static CanTypeWrapper<ExistentialArchetypeType > get(CanType existential);
7005
7008
7006
7009
/// Create a new archetype that represents the opened type
7007
7010
/// of an existential value.
@@ -7014,18 +7017,18 @@ class OpenedArchetypeType final : public LocalArchetypeType,
7014
7017
static Type getAny(Type existential);
7015
7018
7016
7019
static bool classof(const TypeBase *T) {
7017
- return T->getKind() == TypeKind::OpenedArchetype ;
7020
+ return T->getKind() == TypeKind::ExistentialArchetype ;
7018
7021
}
7019
7022
7020
7023
private:
7021
- OpenedArchetypeType (GenericEnvironment *environment, Type interfaceType,
7024
+ ExistentialArchetypeType (GenericEnvironment *environment, Type interfaceType,
7022
7025
ArrayRef<ProtocolDecl *> conformsTo,
7023
7026
Type superclass,
7024
7027
LayoutConstraint layout,
7025
7028
RecursiveTypeProperties properties);
7026
7029
};
7027
- BEGIN_CAN_TYPE_WRAPPER(OpenedArchetypeType , LocalArchetypeType)
7028
- END_CAN_TYPE_WRAPPER(OpenedArchetypeType , LocalArchetypeType)
7030
+ BEGIN_CAN_TYPE_WRAPPER(ExistentialArchetypeType , LocalArchetypeType)
7031
+ END_CAN_TYPE_WRAPPER(ExistentialArchetypeType , LocalArchetypeType)
7029
7032
7030
7033
/// A wrapper around a shape type to use in ArchetypeTrailingObjects
7031
7034
/// for PackArchetypeType.
@@ -7111,7 +7114,7 @@ const Type *ArchetypeType::getSubclassTrailingObjects() const {
7111
7114
if (auto opaqueTy = dyn_cast<OpaqueTypeArchetypeType>(this)) {
7112
7115
return opaqueTy->getTrailingObjects<Type>();
7113
7116
}
7114
- if (auto openedTy = dyn_cast<OpenedArchetypeType >(this)) {
7117
+ if (auto openedTy = dyn_cast<ExistentialArchetypeType >(this)) {
7115
7118
return openedTy->getTrailingObjects<Type>();
7116
7119
}
7117
7120
if (auto childTy = dyn_cast<PackArchetypeType>(this)) {
0 commit comments