mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ModuleInterface/Serialization: allow library authors to define a custom module version number
This allows library authors to pass down a project version number so that library users can conditionally import that library based on the available version in the search paths. Needed for rdar://73992299
This commit is contained in:
@@ -725,7 +725,7 @@ LoadedFile *SerializedModuleLoaderBase::loadAST(
|
||||
M.setHasIncrementalInfo();
|
||||
if (!loadedModuleFile->getModuleABIName().empty())
|
||||
M.setABIName(Ctx.getIdentifier(loadedModuleFile->getModuleABIName()));
|
||||
|
||||
M.setUserModuleVersion(loadedModuleFile->getUserModuleVersion());
|
||||
auto diagLocOrInvalid = diagLoc.getValueOr(SourceLoc());
|
||||
loadInfo.status = loadedModuleFile->associateWithFileContext(
|
||||
fileUnit, diagLocOrInvalid, Ctx.LangOpts.AllowModuleWithCompilerErrors);
|
||||
|
||||
Reference in New Issue
Block a user