Merge remote-tracking branch 'origin/main' into next

This commit is contained in:
swift_jenkins
2020-12-15 13:25:19 -08:00
25 changed files with 405 additions and 209 deletions

View File

@@ -866,6 +866,20 @@ void ModuleFile::getTopLevelDecls(
}
}
void ModuleFile::getExportedPrespecializations(
SmallVectorImpl<Decl *> &results) {
for (DeclID entry : Core->ExportedPrespecializationDecls) {
Expected<Decl *> declOrError = getDeclChecked(entry);
if (!declOrError) {
if (!getContext().LangOpts.EnableDeserializationRecovery)
fatal(declOrError.takeError());
consumeError(declOrError.takeError());
continue;
}
results.push_back(declOrError.get());
}
}
void ModuleFile::getOperatorDecls(SmallVectorImpl<OperatorDecl *> &results) {
PrettyStackTraceModuleFile stackEntry(*this);
if (!Core->OperatorDecls)