mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Frontend] Add --version as a frontend flag.
The new driver will defer to the frontend to print version information, rather than embedded the version information itself.
This commit is contained in:
@@ -1297,7 +1297,13 @@ static bool performCompile(CompilerInstance &Instance,
|
||||
return precompileClangModule(Instance);
|
||||
if (Action == FrontendOptions::ActionType::DumpPCM)
|
||||
return dumpPrecompiledClangModule(Instance);
|
||||
|
||||
if (Action == FrontendOptions::ActionType::PrintVersion) {
|
||||
llvm::outs() << version::getSwiftFullVersion(
|
||||
version::Version::getCurrentLanguageVersion()) << '\n';
|
||||
llvm::outs() << "Target: "
|
||||
<< Invocation.getLangOptions().Target.str() << '\n';
|
||||
return false;
|
||||
}
|
||||
if (Action == FrontendOptions::ActionType::CompileModuleFromInterface)
|
||||
return buildModuleFromInterface(Instance);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user