From 48992554cc6a5586a44e255fb8992da9b8b7eebf Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Thu, 8 Mar 2012 14:24:32 +0000 Subject: [PATCH] Have llvm-mc --version print the list of registered targets like llc does. Patch by jey. llvm-svn: 152315 --- llvm/tools/llvm-mc/llvm-mc.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/tools/llvm-mc/llvm-mc.cpp b/llvm/tools/llvm-mc/llvm-mc.cpp index dc7297412d65..ceed2d6dfa8d 100644 --- a/llvm/tools/llvm-mc/llvm-mc.cpp +++ b/llvm/tools/llvm-mc/llvm-mc.cpp @@ -512,6 +512,9 @@ int main(int argc, char **argv) { llvm::InitializeAllAsmParsers(); llvm::InitializeAllDisassemblers(); + // Register the target printer for --version. + cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion); + cl::ParseCommandLineOptions(argc, argv, "llvm machine code playground\n"); TripleName = Triple::normalize(TripleName); setDwarfDebugFlags(argc, argv);