We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
version::getCompilerversion
1 parent 7c8000b commit a44f42eCopy full SHA for a44f42e
lib/Basic/Version.cpp
@@ -343,10 +343,11 @@ std::string getCompilerVersion() {
343
std::string buf;
344
llvm::raw_string_ostream OS(buf);
345
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;
+#if defined(SWIFT_COMPILER_VERSION)
+ OS << SWIFT_COMPILER_VERSION;
+#else
+ OS << SWIFT_VERSION_STRING;
350
+#endif
351
352
return OS.str();
353
}
0 commit comments