@@ -54,6 +54,7 @@ class QueryInterfaceTypeSubstitutions {
5454// / Extra data in a generic environment for an opened existentiak.
5555struct OpenedGenericEnvironmentData {
5656 Type existential;
57+ GenericSignature parentSig;
5758 UUID uuid;
5859};
5960
@@ -110,7 +111,8 @@ class alignas(1 << DeclAlignInBits) GenericEnvironment final
110111
111112 explicit GenericEnvironment (GenericSignature signature);
112113 explicit GenericEnvironment (
113- GenericSignature signature, Type existential, UUID uuid);
114+ GenericSignature signature,
115+ Type existential, GenericSignature parentSig, UUID uuid);
114116 explicit GenericEnvironment (
115117 GenericSignature signature, OpaqueTypeDecl *opaque, SubstitutionMap subs);
116118
@@ -143,6 +145,9 @@ class alignas(1 << DeclAlignInBits) GenericEnvironment final
143145 // / Retrieve the UUID for an opened existential environment.
144146 UUID getOpenedExistentialUUID () const ;
145147
148+ // / Retrieve the parent signature for an opened existential environment.
149+ GenericSignature getOpenedExistentialParentSignature () const ;
150+
146151 // / Retrieve the opaque type declaration for a generic environment describing
147152 // / opaque types.
148153 OpaqueTypeDecl *getOpaqueTypeDecl () const ;
@@ -158,29 +163,12 @@ class alignas(1 << DeclAlignInBits) GenericEnvironment final
158163
159164 // / Create a new generic environment for an opened existential.
160165 // /
161- // / This function uses the provided parent signature to construct a new
162- // / signature suitable for use with an opened archetype. If you have an
163- // / existing generic signature from e.g. deserialization use
164- // / \c GenericEnvironment::forOpenedArchetypeSignature instead.
165- // /
166166 // / \param existential The subject existential type
167167 // / \param parentSig The signature of the context where this existential type is being opened
168168 // / \param uuid The unique identifier for this opened existential
169169 static GenericEnvironment *
170170 forOpenedExistential (Type existential, GenericSignature parentSig, UUID uuid);
171171
172- // / Create a new generic environment for an opened existential.
173- // /
174- // / It is unlikely you want to use this function.
175- // / Call \c GenericEnvironment::forOpenedExistential instead.
176- // /
177- // / \param existential The subject existential type
178- // / \param signature The signature of the opened archetype
179- // / \param uuid The unique identifier for this opened existential
180- static GenericEnvironment *
181- forOpenedArchetypeSignature (Type existential,
182- GenericSignature signature, UUID uuid);
183-
184172 // / Create a new generic environment for an opaque type with the given set of
185173 // / outer substitutions.
186174 static GenericEnvironment *forOpaqueType (
0 commit comments