Serialization: Read and write support for public module name

This commit is contained in:
Alexis Laferrière
2024-08-20 13:22:55 -07:00
parent 3fe97c2eb8
commit 37521ad21d
8 changed files with 34 additions and 1 deletions

View File

@@ -209,6 +209,9 @@ static bool readOptionsBlock(llvm::BitstreamCursor &cursor,
case options_block::SERIALIZE_PACKAGE_ENABLED:
extendedInfo.setSerializePackageEnabled(true);
break;
case options_block::PUBLIC_MODULE_NAME:
extendedInfo.setPublicModuleName(blobData);
break;
default:
// Unknown options record, possibly for use by a future version of the
// module format.
@@ -1474,6 +1477,7 @@ ModuleFileSharedCore::ModuleFileSharedCore(
ModuleABIName = extInfo.getModuleABIName();
ModulePackageName = extInfo.getModulePackageName();
ModuleExportAsName = extInfo.getExportAsName();
PublicModuleName = extInfo.getPublicModuleName();
hasValidControlBlock = true;
break;