aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-objdump
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2012-05-03 23:20:10 +0000
committerPete Cooper <peter_cooper@apple.com>2012-05-03 23:20:10 +0000
commitff204963cbcd7c68d59f3bba5bfa2797ea0cebae (patch)
tree80e9a806fe6436605558fb9fef41e373b002ad28 /tools/llvm-objdump
parent30b88661f56096831b3b3139787729ec8dca988b (diff)
PR12729: Change 'llvm-objdump' to display the available targets.
Patch by Meador Inge. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156128 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-objdump')
-rw-r--r--tools/llvm-objdump/llvm-objdump.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp
index 5a6f94a1c2..4cf15b614b 100644
--- a/tools/llvm-objdump/llvm-objdump.cpp
+++ b/tools/llvm-objdump/llvm-objdump.cpp
@@ -632,6 +632,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 object file dumper\n");
TripleName = Triple::normalize(TripleName);