Merge remote-tracking branch 'origin/main' into main-to-rebranch

Conflicts:
  - `lib/Serialization/ModuleFileSharedCore.cpp` new headers on main
This commit is contained in:
Ben Barham
2024-09-26 16:01:56 -07:00
135 changed files with 3139 additions and 1665 deletions

View File

@@ -116,6 +116,8 @@ ModuleFile::ModuleFile(std::shared_ptr<const ModuleFileSharedCore> core)
Dependencies.emplace_back(coreDep);
}
MacroModuleNames = core->MacroModuleNames;
// `ModuleFileSharedCore` has immutable data, we copy these into `ModuleFile`
// so we can mutate the arrays and replace the offsets with AST object
// pointers as we lazily deserialize them.
@@ -534,6 +536,11 @@ void ModuleFile::getImportedModules(SmallVectorImpl<ImportedModule> &results,
}
}
void ModuleFile::getExternalMacros(
SmallVectorImpl<ExternalMacroPlugin> &macros) {
macros = MacroModuleNames;
}
void ModuleFile::getImportDecls(SmallVectorImpl<Decl *> &Results) {
if (!Bits.ComputedImportDecls) {
ASTContext &Ctx = getContext();