summaryrefslogtreecommitdiff
path: root/lib/Support
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-07-22 07:50:48 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-07-22 07:50:48 +0000
commit4039313b4c9796d194d90f88675ceb47a183696e (patch)
tree1cb6ebf60733db960d1e987e62a3c96986d83ba7 /lib/Support
parent077c40871780136f7016a496703b20ebea9c0978 (diff)
downloadllvm-4039313b4c9796d194d90f88675ceb47a183696e.tar.gz
llvm-4039313b4c9796d194d90f88675ceb47a183696e.tar.bz2
llvm-4039313b4c9796d194d90f88675ceb47a183696e.tar.xz
Move the registered target printing in version strings completely out of
the Support library. Now its part of the TargetRegistry, and the three commands that care about this explicitly register this extra bit of version information. The set of commands which care was computed by intersecting those which use the Support library's version string printing and those that initialize all the registered targets in a way that produces a meaningful list. The only odd ball out is that 'clang -cc1as -version' no longer prints the registered targets. I don't think anyone is really interested in that (especially as the fact that llvm-mc does so is under a FIXME), but if someone really does want this back I'll happily apply the same patch there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135757 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/CommandLine.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp
index 631d0871af..839ec799d8 100644
--- a/lib/Support/CommandLine.cpp
+++ b/lib/Support/CommandLine.cpp
@@ -23,7 +23,6 @@
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/system_error.h"
-#include "llvm/Target/TargetRegistry.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/Path.h"
#include "llvm/ADT/OwningPtr.h"
@@ -1358,12 +1357,7 @@ public:
<< " Built " << __DATE__ << " (" << __TIME__ << ").\n"
#endif
<< " Host: " << sys::getHostTriple() << '\n'
- << " Host CPU: " << CPU << '\n'
- << '\n';
-
- // FIXME: This needs to be moved into each commandline tool to remove the
- // layer violation.
- TargetRegistry::printRegisteredTargetsForVersion();
+ << " Host CPU: " << CPU << '\n';
}
void operator=(bool OptionWasSpecified) {
if (!OptionWasSpecified) return;
@@ -1377,6 +1371,7 @@ public:
// Iterate over any registered extra printers and call them to add further
// information.
if (ExtraVersionPrinters != 0) {
+ outs() << '\n';
for (std::vector<void (*)()>::iterator I = ExtraVersionPrinters->begin(),
E = ExtraVersionPrinters->end();
I != E; ++I)