mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[AST] Lazily compute ProtocolDecl::getKnownProtocolKind()
Rather than eagerly doing a bunch of name lookups to establish the known protocol kind, lazily match the ProtocolDecl to the list of known protocols as-needed. This eliminates a bunch of up-front unqualified name lookups when spinning up a type checker.
This commit is contained in:
@@ -803,11 +803,6 @@ void CompilerInstance::parseAndCheckTypesUpTo(
|
||||
options.SwitchCheckingInvocationThreshold);
|
||||
});
|
||||
|
||||
// Even if there were no source files, we should still record known
|
||||
// protocols.
|
||||
if (auto *stdlib = Context->getStdlibModule())
|
||||
Context->recordKnownProtocols(stdlib);
|
||||
|
||||
if (Invocation.isCodeCompletion()) {
|
||||
performDelayedParsing(MainModule, PersistentState,
|
||||
Invocation.getCodeCompletionFactory());
|
||||
|
||||
Reference in New Issue
Block a user