summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r--clang/lib/Driver/Driver.cpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index fd2eb61f75b..ab948552d92 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -410,24 +410,13 @@ void Driver::PrintHelp(bool ShowHidden) const {
}
void Driver::PrintVersion(const Compilation &C, llvm::raw_ostream &OS) const {
- static char buf[] = "$URL$";
- char *zap = strstr(buf, "/lib/Driver");
- if (zap)
- *zap = 0;
- zap = strstr(buf, "/clang/tools/clang");
- if (zap)
- *zap = 0;
- const char *vers = buf+6;
- // FIXME: Add cmake support and remove #ifdef
-#ifdef SVN_REVISION
- const char *revision = SVN_REVISION;
-#else
- const char *revision = "";
-#endif
// FIXME: The following handlers should use a callback mechanism, we don't
// know what the client would like to do.
OS << "clang version " CLANG_VERSION_STRING " ("
- << vers << " " << revision << ")" << '\n';
+ << getClangSubversionPath();
+ if (unsigned Revision = getClangSubversionRevision())
+ OS << " " << Revision;
+ OS << ")" << '\n';
const ToolChain &TC = C.getDefaultToolChain();
OS << "Target: " << TC.getTripleString() << '\n';
OpenPOWER on IntegriCloud