Skip to content

Commit 8fe97c4

Browse files
committed
AST: Make SubstitutionMap::lookupSubstitution() private
1 parent 9c2b471 commit 8fe97c4

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

include/swift/AST/SubstitutionMap.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,6 @@ class SubstitutionMap {
8383
/// Retrieve the conformances for the given type.
8484
ArrayRef<ProtocolConformanceRef> getConformances(CanType type) const;
8585

86-
/// Look up the replacement for the given type parameter or interface type.
87-
/// Note that this only finds replacements for maps that are directly
88-
/// stored inside the map. In most cases, you should call Type::subst()
89-
/// instead, since that will resolve member types also.
90-
Type lookupSubstitution(CanSubstitutableType type) const;
91-
9286
bool empty() const {
9387
return subMap.empty();
9488
}
@@ -149,6 +143,13 @@ class SubstitutionMap {
149143
private:
150144
friend class GenericSignature;
151145
friend class GenericEnvironment;
146+
friend struct QuerySubstitutionMap;
147+
148+
/// Look up the replacement for the given type parameter or interface type.
149+
/// Note that this only finds replacements for maps that are directly
150+
/// stored inside the map. In most cases, you should call Type::subst()
151+
/// instead, since that will resolve member types also.
152+
Type lookupSubstitution(CanSubstitutableType type) const;
152153

153154
// You should not need to call these directly to build SubstitutionMaps;
154155
// instead, use GenericSignature::getSubstitutionMap() or

0 commit comments

Comments
 (0)