mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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:
@@ -356,6 +356,14 @@ public:
|
||||
ModuleABIName = name;
|
||||
}
|
||||
|
||||
/// User-defined module version number.
|
||||
llvm::VersionTuple UserModuleVersion;
|
||||
void setUserModuleVersion(llvm::VersionTuple UserVer) {
|
||||
UserModuleVersion = UserVer;
|
||||
}
|
||||
llvm::VersionTuple getUserModuleVersion() const {
|
||||
return UserModuleVersion;
|
||||
}
|
||||
private:
|
||||
/// A cache of this module's underlying module and required bystander if it's
|
||||
/// an underscored cross-import overlay.
|
||||
|
||||
Reference in New Issue
Block a user