Skip to content

Commit 17af078

Browse files
committed
[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
1 parent e7a8290 commit 17af078

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/Basic/Version.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,10 @@ std::string getCompilerVersion() {
343343
std::string buf;
344344
llvm::raw_string_ostream OS(buf);
345345

346-
#if defined(SWIFT_COMPILER_VERSION)
347-
OS << SWIFT_COMPILER_VERSION;
348-
#else
349-
OS << SWIFT_VERSION_STRING;
350-
#endif
346+
// TODO: This should print SWIFT_COMPILER_VERSION when
347+
// available, but to do that we need to switch from
348+
// llvm::VersionTuple to swift::Version.
349+
OS << SWIFT_VERSION_STRING;
351350

352351
return OS.str();
353352
}

0 commit comments

Comments
 (0)