mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Basic] Limit version::getCompilerversion to major + minor only
At the moment the only user of this method is `-interface-compiler-version` and it's checked against major + minor only, so this is not going to affect functionality. In the future we should switch from `llvm::VersionTuple` to `swift::Version` because swift tags have five components. Resolves: rdar://140006577
This commit is contained in:
committed by
Allan Shortlidge
parent
f778170cfb
commit
bc2a640ce7
@@ -343,11 +343,10 @@ std::string getCompilerVersion() {
|
||||
std::string buf;
|
||||
llvm::raw_string_ostream OS(buf);
|
||||
|
||||
#if defined(SWIFT_COMPILER_VERSION)
|
||||
OS << SWIFT_COMPILER_VERSION;
|
||||
#else
|
||||
OS << SWIFT_VERSION_STRING;
|
||||
#endif
|
||||
// TODO: This should print SWIFT_COMPILER_VERSION when
|
||||
// available, but to do that we need to switch from
|
||||
// llvm::VersionTuple to swift::Version.
|
||||
OS << SWIFT_VERSION_STRING;
|
||||
|
||||
return OS.str();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user