diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-04-04 05:17:38 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-04-04 05:17:38 +0000 |
| commit | e06dc219a869d73b6c9a398a2dee0aa2d4e2dcf0 (patch) | |
| tree | 7f90cb75a5531c37d80672390c1922dd4d370db4 /lib/Driver/Driver.cpp | |
| parent | 0b46e1b5389615a8d6641f4d7bf5415d29acfef3 (diff) | |
| download | clang-e06dc219a869d73b6c9a398a2dee0aa2d4e2dcf0.tar.gz clang-e06dc219a869d73b6c9a398a2dee0aa2d4e2dcf0.tar.bz2 clang-e06dc219a869d73b6c9a398a2dee0aa2d4e2dcf0.tar.xz | |
Driver: Handle -dumpversion, this is used by some configuration
scripts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68418 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
| -rw-r--r-- | lib/Driver/Driver.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 74c4b07975..68ff8bc8b0 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -312,6 +312,8 @@ void Driver::PrintVersion(const Compilation &C) const { #endif // FIXME: The following handlers should use a callback mechanism, we // don't know what the client would like to do. + + // FIXME: Do not hardcode clang version. llvm::errs() << "clang version 1.0 (" << vers << " " << revision << ")" << "\n"; const ToolChain &TC = C.getDefaultToolChain(); @@ -323,6 +325,12 @@ bool Driver::HandleImmediateArgs(const Compilation &C) { // place, but we don't expect inconsistencies w.r.t. that to matter // in practice. + if (C.getArgs().hasArg(options::OPT_dumpversion)) { + // FIXME: Do not hardcode clang version. + llvm::outs() << "1.0\n"; + return false; + } + if (C.getArgs().hasArg(options::OPT__help)) { PrintHelp(); return false; |
