Skip to content

Commit eacf223

Browse files
committed
[SIL Optimizer] Remove now-unused static function. NFC
1 parent 5cf3821 commit eacf223

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

lib/SILOptimizer/Utils/Local.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,28 +1332,6 @@ void ValueLifetimeAnalysis::dump() const {
13321332
// Casts Optimization and Simplification
13331333
//===----------------------------------------------------------------------===//
13341334

1335-
/// \brief Get a substitution corresponding to the type witness.
1336-
/// Inspired by ProtocolConformance::getTypeWitnessByName.
1337-
static const Substitution *
1338-
getTypeWitnessByName(ProtocolConformance *conformance, Identifier name) {
1339-
// Find the named requirement.
1340-
AssociatedTypeDecl *assocType = nullptr;
1341-
assert(conformance && "Missing conformance information");
1342-
auto members = conformance->getProtocol()->lookupDirect(name);
1343-
for (auto member : members) {
1344-
assocType = dyn_cast<AssociatedTypeDecl>(member);
1345-
if (assocType)
1346-
break;
1347-
}
1348-
1349-
if (!assocType)
1350-
return nullptr;
1351-
1352-
if (!conformance->hasTypeWitness(assocType, nullptr)) {
1353-
return nullptr;
1354-
}
1355-
return &conformance->getTypeWitness(assocType, nullptr);
1356-
}
13571335

13581336
/// Check if is a bridging cast, i.e. one of the sides is
13591337
/// a bridged type.

0 commit comments

Comments
 (0)