Add -package-name flag

De/serialize package name in module binary
Resoles rdar://103531218, rdar://103531208
This commit is contained in:
Ellie Shin
2022-12-14 15:49:09 -08:00
parent cfe49a0f9b
commit 72ee150982
14 changed files with 67 additions and 0 deletions

View File

@@ -779,6 +779,8 @@ LoadedFile *SerializedModuleLoaderBase::loadAST(
M.setABIName(Ctx.getIdentifier(loadedModuleFile->getModuleABIName()));
if (loadedModuleFile->isConcurrencyChecked())
M.setIsConcurrencyChecked();
if (!loadedModuleFile->getModulePackageName().empty())
M.setPackageName(Ctx.getIdentifier(loadedModuleFile->getModulePackageName()));
M.setUserModuleVersion(loadedModuleFile->getUserModuleVersion());
for (auto name: loadedModuleFile->getAllowableClientNames()) {
M.addAllowableClientName(Ctx.getIdentifier(name));