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

@@ -163,6 +163,9 @@ static bool readOptionsBlock(llvm::BitstreamCursor &cursor,
case options_block::IS_CONCURRENCY_CHECKED:
extendedInfo.setIsConcurrencyChecked(true);
break;
case options_block::MODULE_PACKAGE_NAME:
extendedInfo.setModulePackageName(blobData);
break;
default:
// Unknown options record, possibly for use by a future version of the
// module format.
@@ -1346,6 +1349,7 @@ ModuleFileSharedCore::ModuleFileSharedCore(
Bits.IsConcurrencyChecked = extInfo.isConcurrencyChecked();
MiscVersion = info.miscVersion;
ModuleABIName = extInfo.getModuleABIName();
ModulePackageName = extInfo.getModulePackageName();
hasValidControlBlock = true;
break;