@@ -254,6 +254,9 @@ class ModuleDecl
254
254
255
255
mutable Identifier PublicModuleName;
256
256
257
+ // / Indicates that version of the Swift compiler this module was built with.
258
+ mutable llvm::VersionTuple SwiftCompilerVersion;
259
+
257
260
public:
258
261
// / Produces the components of a given module's full name in reverse order.
259
262
// /
@@ -518,11 +521,20 @@ class ModuleDecl
518
521
PublicModuleName = name;
519
522
}
520
523
524
+ // / The version of the Swift compiler this module was built with.
525
+ llvm::VersionTuple getSwiftCompilerVersion () const {
526
+ return SwiftCompilerVersion;
527
+ }
528
+
529
+ void setSwiftCompilerVersion (llvm::VersionTuple version) {
530
+ SwiftCompilerVersion = version;
531
+ }
532
+
521
533
// / Retrieve the actual module name of an alias used for this module (if any).
522
534
// /
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.
535
+ // / For example, if '-module-alias Foo=Bar' is passed in when building the
536
+ // / main module, and this module is (a) not the main module and (b) is named
537
+ // / Foo, then it returns the real (physically on-disk) module name Bar.
526
538
// /
527
539
// / If no module aliasing is set, it will return getName(), i.e. Foo.
528
540
Identifier getRealName () const ;
0 commit comments