@@ -75,7 +75,7 @@ class GenericSignatureBuilder;
7575class Identifier ;
7676class InOutType ;
7777class OpaqueTypeDecl ;
78- class OpenedArchetypeType ;
78+ class ExistentialArchetypeType ;
7979class PackExpansionType ;
8080class PackType ;
8181enum class ParamSpecifier : uint8_t ;
@@ -114,6 +114,9 @@ enum class TypeKind : uint8_t {
114114#define TYPE_RANGE (Id, FirstId, LastId ) \
115115 First_##Id##Type = FirstId, Last_##Id##Type = LastId,
116116#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
117120};
118121
119122enum : unsigned {
@@ -6971,16 +6974,16 @@ class LocalArchetypeType : public ArchetypeType {
69716974
69726975public:
69736976 static bool classof (const TypeBase *type) {
6974- return type->getKind () == TypeKind::OpenedArchetype ||
6977+ return type->getKind () == TypeKind::ExistentialArchetype ||
69756978 type->getKind () == TypeKind::ElementArchetype;
69766979 }
69776980};
69786981BEGIN_CAN_TYPE_WRAPPER (LocalArchetypeType, ArchetypeType)
69796982END_CAN_TYPE_WRAPPER(LocalArchetypeType, ArchetypeType)
69806983
69816984// / 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 >
69846987{
69856988 friend TrailingObjects;
69866989 friend ArchetypeType;
@@ -6991,7 +6994,7 @@ class OpenedArchetypeType final : public LocalArchetypeType,
69916994 // /
69926995 // / This is only invoked by the generic environment when mapping the
69936996 // / interface type into context.
6994- static CanTypeWrapper<OpenedArchetypeType >
6997+ static CanTypeWrapper<ExistentialArchetypeType >
69956998 getNew (GenericEnvironment *environment, Type interfaceType,
69966999 ArrayRef<ProtocolDecl *> conformsTo, Type superclass,
69977000 LayoutConstraint layout);
@@ -7001,7 +7004,7 @@ class OpenedArchetypeType final : public LocalArchetypeType,
70017004 // / of an existential value.
70027005 // /
70037006 // / \param existential The existential type to open.
7004- static CanTypeWrapper<OpenedArchetypeType > get (CanType existential);
7007+ static CanTypeWrapper<ExistentialArchetypeType > get (CanType existential);
70057008
70067009 // / Create a new archetype that represents the opened type
70077010 // / of an existential value.
@@ -7014,18 +7017,18 @@ class OpenedArchetypeType final : public LocalArchetypeType,
70147017 static Type getAny (Type existential);
70157018
70167019 static bool classof (const TypeBase *T) {
7017- return T->getKind () == TypeKind::OpenedArchetype ;
7020+ return T->getKind () == TypeKind::ExistentialArchetype ;
70187021 }
70197022
70207023private:
7021- OpenedArchetypeType (GenericEnvironment *environment, Type interfaceType,
7024+ ExistentialArchetypeType (GenericEnvironment *environment, Type interfaceType,
70227025 ArrayRef<ProtocolDecl *> conformsTo,
70237026 Type superclass,
70247027 LayoutConstraint layout,
70257028 RecursiveTypeProperties properties);
70267029};
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)
70297032
70307033// / A wrapper around a shape type to use in ArchetypeTrailingObjects
70317034// / for PackArchetypeType.
@@ -7111,7 +7114,7 @@ const Type *ArchetypeType::getSubclassTrailingObjects() const {
71117114 if (auto opaqueTy = dyn_cast<OpaqueTypeArchetypeType>(this )) {
71127115 return opaqueTy->getTrailingObjects <Type>();
71137116 }
7114- if (auto openedTy = dyn_cast<OpenedArchetypeType >(this )) {
7117+ if (auto openedTy = dyn_cast<ExistentialArchetypeType >(this )) {
71157118 return openedTy->getTrailingObjects <Type>();
71167119 }
71177120 if (auto childTy = dyn_cast<PackArchetypeType>(this )) {
0 commit comments