Merge pull request #62251 from nkcsgexi/allowable-serialization

serialization: encode allowable client names in binary module format
This commit is contained in:
Xi Ge
2022-11-28 18:12:43 -08:00
committed by GitHub
19 changed files with 115 additions and 2 deletions

View File

@@ -781,6 +781,9 @@ LoadedFile *SerializedModuleLoaderBase::loadAST(
if (loadedModuleFile->isConcurrencyChecked())
M.setIsConcurrencyChecked();
M.setUserModuleVersion(loadedModuleFile->getUserModuleVersion());
for (auto name: loadedModuleFile->getAllowableClientNames()) {
M.addAllowableClientName(Ctx.getIdentifier(name));
}
auto diagLocOrInvalid = diagLoc.value_or(SourceLoc());
loadInfo.status = loadedModuleFile->associateWithFileContext(
fileUnit, diagLocOrInvalid, Ctx.LangOpts.AllowModuleWithCompilerErrors);