mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Frontend/AST] Make it possible to determine Swift compiler version used to build a ModuleDecl
This commit is contained in:
@@ -1489,6 +1489,9 @@ ModuleDecl *CompilerInstance::getMainModule() const {
|
||||
if (Invocation.getSILOptions().EnableSerializePackage)
|
||||
MainModule->setSerializePackageEnabled();
|
||||
|
||||
MainModule->setSwiftCompilerVersion(
|
||||
Invocation.getFrontendOptions().SwiftCompilerVersion);
|
||||
|
||||
// Register the main module with the AST context.
|
||||
Context->addLoadedModule(MainModule);
|
||||
Context->MainModule = MainModule;
|
||||
|
||||
Reference in New Issue
Block a user