mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Serialize decls with _specialize(exported:true, target: somefunc(_:), ...) in a list for fast lookup
rdar://71430641
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user