mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -5539,10 +5539,10 @@ static void collectInterestingNestedDeclarations(
|
||||
if (isLocal)
|
||||
return;
|
||||
|
||||
if (auto owningClass = func->getDeclContext()->getSelfClassDecl()) {
|
||||
if (auto owningType = func->getDeclContext()->getSelfNominalTypeDecl()) {
|
||||
if (func->isObjC()) {
|
||||
Mangle::ASTMangler mangler;
|
||||
std::string ownerName = mangler.mangleNominalType(owningClass);
|
||||
std::string ownerName = mangler.mangleNominalType(owningType);
|
||||
assert(!ownerName.empty() && "Mangled type came back empty!");
|
||||
|
||||
objcMethods[func->getObjCSelector()].push_back(
|
||||
|
||||
Reference in New Issue
Block a user