Add loadDynamicallyReplacedFunctionDecl

To support lazy resolution of the cross-referenced function in a serialized @_dynamicReplacement(for: ...) attribute, add a utility to the LazyMemberLoader and plumb it through.  This is a more general utility than the current resolver, which relies on the type checker to strip the attribute off of VarDecls and fan it back out onto accessors, which means serialization has only ever seen AbstractFunctionDecls.
This commit is contained in:
Robert Widmann
2019-11-22 00:53:54 -08:00
parent ee99bf1f57
commit ac08fceacc
4 changed files with 20 additions and 0 deletions

View File

@@ -839,6 +839,10 @@ public:
virtual Type loadAssociatedTypeDefault(const AssociatedTypeDecl *ATD,
uint64_t contextData) override;
virtual ValueDecl *
loadDynamicallyReplacedFunctionDecl(const DynamicReplacementAttr *DRA,
uint64_t contextData) override;
virtual void finishNormalConformance(NormalProtocolConformance *conformance,
uint64_t contextData) override;