diff options
author | Mike Stump <mrs@apple.com> | 2009-03-18 14:00:02 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-03-18 14:00:02 +0000 |
commit | 5d023c3edee981a70d4955ac0cb22bd01817c788 (patch) | |
tree | 21aabff56e328d2c35449bcb8f3d296d2cc203e7 /lib/Driver/Driver.cpp | |
parent | 1d46033f760ba5fd266ce59fe391fac473f04f52 (diff) |
Improve version number.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67204 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r-- | lib/Driver/Driver.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 0cb14886e9..fd2ff48138 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -212,11 +212,22 @@ void Driver::PrintOptions(const ArgList &Args) const { } void Driver::PrintVersion() const { - // FIXME: Get a reasonable version number. + 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+10; // FIXME: The following handlers should use a callback mechanism, we // don't know what the client would like to do. - llvm::errs() << "ccc version 1.0" << "\n"; + llvm::errs() << "ccc version 1.0 (" << vers << ")" << "\n"; + // FIXME: Add cmake support and remove #ifdef +#ifdef TARGET_TRIPLE + llvm::errs() << "Target: " << TARGET_TRIPLE << "\n"; +#endif } bool Driver::HandleImmediateArgs(const Compilation &C) { |