mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 18:04:59 +00:00
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. llvm-svn: 135757
This commit is contained in:
parent
0ad63a1326
commit
9df16051f4
@ -23,7 +23,6 @@
|
|||||||
#include "llvm/Support/ManagedStatic.h"
|
#include "llvm/Support/ManagedStatic.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include "llvm/Support/system_error.h"
|
#include "llvm/Support/system_error.h"
|
||||||
#include "llvm/Target/TargetRegistry.h"
|
|
||||||
#include "llvm/Support/Host.h"
|
#include "llvm/Support/Host.h"
|
||||||
#include "llvm/Support/Path.h"
|
#include "llvm/Support/Path.h"
|
||||||
#include "llvm/ADT/OwningPtr.h"
|
#include "llvm/ADT/OwningPtr.h"
|
||||||
@ -1358,12 +1357,7 @@ public:
|
|||||||
<< " Built " << __DATE__ << " (" << __TIME__ << ").\n"
|
<< " Built " << __DATE__ << " (" << __TIME__ << ").\n"
|
||||||
#endif
|
#endif
|
||||||
<< " Host: " << sys::getHostTriple() << '\n'
|
<< " Host: " << sys::getHostTriple() << '\n'
|
||||||
<< " Host CPU: " << CPU << '\n'
|
<< " Host CPU: " << CPU << '\n';
|
||||||
<< '\n';
|
|
||||||
|
|
||||||
// FIXME: This needs to be moved into each commandline tool to remove the
|
|
||||||
// layer violation.
|
|
||||||
TargetRegistry::printRegisteredTargetsForVersion();
|
|
||||||
}
|
}
|
||||||
void operator=(bool OptionWasSpecified) {
|
void operator=(bool OptionWasSpecified) {
|
||||||
if (!OptionWasSpecified) return;
|
if (!OptionWasSpecified) return;
|
||||||
@ -1377,6 +1371,7 @@ public:
|
|||||||
// Iterate over any registered extra printers and call them to add further
|
// Iterate over any registered extra printers and call them to add further
|
||||||
// information.
|
// information.
|
||||||
if (ExtraVersionPrinters != 0) {
|
if (ExtraVersionPrinters != 0) {
|
||||||
|
outs() << '\n';
|
||||||
for (std::vector<void (*)()>::iterator I = ExtraVersionPrinters->begin(),
|
for (std::vector<void (*)()>::iterator I = ExtraVersionPrinters->begin(),
|
||||||
E = ExtraVersionPrinters->end();
|
E = ExtraVersionPrinters->end();
|
||||||
I != E; ++I)
|
I != E; ++I)
|
||||||
|
@ -238,6 +238,9 @@ int main(int argc, char **argv) {
|
|||||||
InitializeAllAsmPrinters();
|
InitializeAllAsmPrinters();
|
||||||
InitializeAllAsmParsers();
|
InitializeAllAsmParsers();
|
||||||
|
|
||||||
|
// Register the target printer for --version.
|
||||||
|
cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion);
|
||||||
|
|
||||||
cl::ParseCommandLineOptions(argc, argv, "llvm system compiler\n");
|
cl::ParseCommandLineOptions(argc, argv, "llvm system compiler\n");
|
||||||
|
|
||||||
// Load the module to be compiled...
|
// Load the module to be compiled...
|
||||||
|
@ -463,6 +463,10 @@ int main(int argc, char **argv) {
|
|||||||
llvm::InitializeAllAsmParsers();
|
llvm::InitializeAllAsmParsers();
|
||||||
llvm::InitializeAllDisassemblers();
|
llvm::InitializeAllDisassemblers();
|
||||||
|
|
||||||
|
// Register the target printer for --version.
|
||||||
|
// FIXME: Remove when we stop initializing the Target(Machine)s above.
|
||||||
|
cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion);
|
||||||
|
|
||||||
cl::ParseCommandLineOptions(argc, argv, "llvm machine code playground\n");
|
cl::ParseCommandLineOptions(argc, argv, "llvm machine code playground\n");
|
||||||
TripleName = Triple::normalize(TripleName);
|
TripleName = Triple::normalize(TripleName);
|
||||||
|
|
||||||
|
@ -313,6 +313,10 @@ int main(int argc, char **argv) {
|
|||||||
llvm::InitializeAllAsmParsers();
|
llvm::InitializeAllAsmParsers();
|
||||||
llvm::InitializeAllDisassemblers();
|
llvm::InitializeAllDisassemblers();
|
||||||
|
|
||||||
|
// Register the target printer for --version.
|
||||||
|
// FIXME: Remove when we stop initializing the Target(Machine)s above.
|
||||||
|
cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion);
|
||||||
|
|
||||||
cl::ParseCommandLineOptions(argc, argv, "llvm object file dumper\n");
|
cl::ParseCommandLineOptions(argc, argv, "llvm object file dumper\n");
|
||||||
TripleName = Triple::normalize(TripleName);
|
TripleName = Triple::normalize(TripleName);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user