@@ -172,7 +172,7 @@ FormalLinkage swift::getGenericSignatureLinkage(CanGenericSignature sig) {
172172 case RequirementKind::Conformance:
173173 case RequirementKind::SameType:
174174 case RequirementKind::Superclass:
175- switch (getTypeLinkage_correct (CanType (req.getSecondType ()))) {
175+ switch (getTypeLinkage (CanType (req.getSecondType ()))) {
176176 case FormalLinkage::PublicUnique:
177177 case FormalLinkage::PublicNonUnique:
178178 continue ;
@@ -189,19 +189,6 @@ FormalLinkage swift::getGenericSignatureLinkage(CanGenericSignature sig) {
189189 return linkage;
190190}
191191
192- // / Return the formal linkage of the given formal type.
193- // /
194- // / Note that this function is buggy and generally should not be
195- // / used in new code; we should migrate all callers to
196- // / getTypeLinkage_correct and then consolidate them.
197- FormalLinkage swift::getTypeLinkage (CanType t) {
198- assert (t->isLegalFormalType ());
199- // Due to a bug, this always returns PublicUnique.
200- // It's a bit late in the 5.7 timeline to be changing that, but
201- // we can optimize it!
202- return FormalLinkage::PublicUnique;
203- }
204-
205192// / Return the formal linkage of the given formal type.
206193// / This in the appropriate linkage for a lazily-emitted entity
207194// / derived from the type.
@@ -211,7 +198,7 @@ FormalLinkage swift::getTypeLinkage(CanType t) {
211198// / uniquely-emitted nominal type, the formal linkage of that
212199// / type may differ from the formal linkage of the underlying
213200// / type declaration.
214- FormalLinkage swift::getTypeLinkage_correct (CanType t) {
201+ FormalLinkage swift::getTypeLinkage (CanType t) {
215202 assert (t->isLegalFormalType ());
216203
217204 class Walker : public TypeWalker {
@@ -265,7 +252,6 @@ static bool isTypeMetadataForLayoutAccessible(SILModule &M, SILType type) {
265252
266253 // Otherwise, check that we can fetch the type metadata.
267254 return M.isTypeMetadataAccessible (type.getASTType ());
268-
269255}
270256
271257// / Can we perform value operations on the given type? We have no way
0 commit comments