Commit Graph

6 Commits

Author SHA1 Message Date
Pavel Yaskevich
fe8fd91307 [AST] NFC: Fold PackConformance::isInvalid into ProtocolConformanceRef::isInvalid
Instead of making callers responsible for that (like in other cases),
let's fold the code check `isInvalid` to make mistakes less likely.
2023-05-26 08:53:11 -07:00
John McCall
4edfd79fc9 [NFC] Add a convenience function to IFS 2023-03-25 18:54:14 -04:00
John McCall
80551ce8ad [NFC] Thread a common type through all the AST substitution code.
There are a lot of problems caused by our highly-abstract substitution
subsystem.  Most of them would be solved by a more semantic / holistic
understanding of the active transformation, but that's difficult to do
because we just pass around function_refs.  The first step in fixing
that is to pass around a better currency type.  For now, it can just
hold the function_refs (and the SubstOptions).

I've set it up so that the places that just apply SubstitutionMaps
are constructing the IFS in a standard way; that should make it easy
to change those places in the future.
2023-03-25 18:54:14 -04:00
Slava Pestov
a355c38a34 AST: Rename ProtocolConformance::getSubstitutions() to getSubstitutionMap() and remove ModuleDecl parameter 2023-03-21 16:16:34 -04:00
Slava Pestov
0f26d02fb1 AST: ProtocolConformanceRef can store a pack conformance 2022-08-23 21:07:30 -04:00
Slava Pestov
e08e525063 AST: Split off ProtocolConformanceRef.cpp from ProtocolConformance.cpp 2022-08-23 11:12:01 -04:00