mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -5457,6 +5457,11 @@ ModuleFile::loadAssociatedTypeDefault(const swift::AssociatedTypeDecl *ATD,
|
||||
return getType(contextData);
|
||||
}
|
||||
|
||||
ValueDecl *ModuleFile::loadDynamicallyReplacedFunctionDecl(
|
||||
const DynamicReplacementAttr *DRA, uint64_t contextData) {
|
||||
return cast<ValueDecl>(getDecl(contextData));
|
||||
}
|
||||
|
||||
void ModuleFile::finishNormalConformance(NormalProtocolConformance *conformance,
|
||||
uint64_t contextData) {
|
||||
using namespace decls_block;
|
||||
|
||||
Reference in New Issue
Block a user