File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -48,13 +48,18 @@ enum class CombineSubstitutionMaps {
48
48
// / abstract types to replacement types, together with associated conformances
49
49
// / to use for deriving nested types and conformances.
50
50
// /
51
- // / Depending on how the SubstitutionMap is constructed, the abstract types are
52
- // / either archetypes or interface types. Care must be exercised to only look
53
- // / up one or the other .
51
+ // / Substitution maps are primarily used when performing substitutions into
52
+ // / any entity that can reference type parameters, e.g., types (via
53
+ // / Type::subst()) and conformances (via ProtocolConformanceRef::subst()) .
54
54
// /
55
55
// / SubstitutionMaps are constructed by calling the getSubstitutionMap() method
56
56
// / on a GenericSignature or (equivalently) by calling one of the static
57
- // / \c SubstitutionMap::get() methods.
57
+ // / \c SubstitutionMap::get() methods. However, most substitution maps are
58
+ // / computed using higher-level entry points such as
59
+ // / TypeBase::getMemberSubstitutionMap().
60
+ // /
61
+ // / Substitution maps are ASTContext-allocated and are uniqued on construction,
62
+ // / so they can be used as fields in AST nodes.
58
63
class SubstitutionMap {
59
64
public:
60
65
// / Stored data for a substitution map, which uses tail allocation for the
You can’t perform that action at this time.
0 commit comments