Skip to content

Commit 861d8eb

Browse files
committed
Serialization: Don't reconstruct inheritance clause of protocol
1 parent d86a301 commit 861d8eb

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

lib/Serialization/Deserialization.cpp

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3216,21 +3216,6 @@ class DeclDeserializer {
32163216
decl.get<ExtensionDecl *>()->setInherited(inherited);
32173217
}
32183218

3219-
void handleInherited(ProtocolDecl *P,
3220-
ArrayRef<ProtocolDecl *> inherited) {
3221-
SmallVector<InheritedEntry, 2> inheritedTypes;
3222-
llvm::transform(inherited, std::back_inserter(inheritedTypes), [](auto *I) {
3223-
return InheritedEntry(TypeLoc::withoutLoc(I->getDeclaredInterfaceType()),
3224-
/*isUnchecked=*/false,
3225-
/*isRetroactive=*/false,
3226-
/*isPreconcurrency=*/false);
3227-
});
3228-
3229-
P->setInherited(ctx.AllocateCopy(inheritedTypes));
3230-
ctx.evaluator.cacheOutput(InheritedProtocolsRequest{P},
3231-
ctx.AllocateCopy(inherited));
3232-
}
3233-
32343219
public:
32353220
DeclDeserializer(ModuleFile &MF, Serialized<Decl *> &declOrOffset)
32363221
: MF(MF), ctx(MF.getContext()), declOrOffset(declOrOffset) {}
@@ -4517,7 +4502,8 @@ class DeclDeserializer {
45174502
if (!MF.readInheritedProtocols(inherited))
45184503
return MF.diagnoseFatal();
45194504

4520-
handleInherited(proto, inherited);
4505+
ctx.evaluator.cacheOutput(InheritedProtocolsRequest{proto},
4506+
ctx.AllocateCopy(inherited));
45214507

45224508
auto genericParams = MF.maybeReadGenericParams(DC);
45234509
assert(genericParams && "protocol with no generic parameters?");

0 commit comments

Comments
 (0)