@@ -254,6 +254,10 @@ class ModuleDecl
254254
255255 mutable Identifier PublicModuleName;
256256
257+ // / Indicates a version of the Swift compiler used to generate
258+ // / .swiftinterface file that this module was produced from (if any).
259+ mutable llvm::VersionTuple InterfaceCompilerVersion;
260+
257261public:
258262 // / Produces the components of a given module's full name in reverse order.
259263 // /
@@ -518,11 +522,20 @@ class ModuleDecl
518522 PublicModuleName = name;
519523 }
520524
525+ // / See \c InterfaceCompilerVersion
526+ llvm::VersionTuple getSwiftInterfaceCompilerVersion () const {
527+ return InterfaceCompilerVersion;
528+ }
529+
530+ void setSwiftInterfaceCompilerVersion (llvm::VersionTuple version) {
531+ InterfaceCompilerVersion = version;
532+ }
533+
521534 // / Retrieve the actual module name of an alias used for this module (if any).
522535 // /
523- // / For example, if '-module-alias Foo=Bar' is passed in when building the main module,
524- // / and this module is (a) not the main module and (b) is named Foo, then it returns
525- // / the real (physically on-disk) module name Bar.
536+ // / For example, if '-module-alias Foo=Bar' is passed in when building the
537+ // / main module, and this module is (a) not the main module and (b) is named
538+ // / Foo, then it returns the real (physically on-disk) module name Bar.
526539 // /
527540 // / If no module aliasing is set, it will return getName(), i.e. Foo.
528541 Identifier getRealName () const ;
0 commit comments