[NFC] Serialize ObjC selectors for protocols

The ObjCMethodLookupTable for protocols was not being serialized and rebuilt on load, so NominalTypeDecl::lookupDirect() on selectors was not working correctly for deserialized types. Correct this oversight.
This commit is contained in:
Becca Royal-Gordon
2022-06-16 14:07:49 -07:00
parent dc4162fddb
commit 9b5f89963b
12 changed files with 40 additions and 30 deletions

View File

@@ -613,7 +613,7 @@ void ModuleFile::loadExtensions(NominalTypeDecl *nominal) {
}
void ModuleFile::loadObjCMethods(
ClassDecl *classDecl,
NominalTypeDecl *typeDecl,
ObjCSelector selector,
bool isInstanceMethod,
llvm::TinyPtrVector<AbstractFunctionDecl *> &methods) {
@@ -627,7 +627,7 @@ void ModuleFile::loadObjCMethods(
return;
}
std::string ownerName = Mangle::ASTMangler().mangleNominalType(classDecl);
std::string ownerName = Mangle::ASTMangler().mangleNominalType(typeDecl);
auto results = *known;
for (const auto &result : results) {
// If the method is the wrong kind (instance vs. class), skip it.