diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-03-19 18:07:50 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-03-19 18:07:50 +0000 |
commit | 4d4358e8b083b38e2d7e9de3ab102e5665ffb8e2 (patch) | |
tree | 4ffc5e98da1bd124804c125bc8c8ff9425511224 /tools/llvm-mc/llvm-mc.cpp | |
parent | 0180daee024b97c87c34ac8c2a7b88c9e643c9aa (diff) | |
download | external_llvm-4d4358e8b083b38e2d7e9de3ab102e5665ffb8e2.zip external_llvm-4d4358e8b083b38e2d7e9de3ab102e5665ffb8e2.tar.gz external_llvm-4d4358e8b083b38e2d7e9de3ab102e5665ffb8e2.tar.bz2 |
llvm-mc: Fix target selection for --disassemble to use GetTarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98973 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc/llvm-mc.cpp')
-rw-r--r-- | tools/llvm-mc/llvm-mc.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index 3778bc9..62391b2 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -318,13 +318,9 @@ static int AssembleInput(const char *ProgName) { } static int DisassembleInput(const char *ProgName) { - std::string Error; - const Target *TheTarget = TargetRegistry::lookupTarget(TripleName, Error); - if (TheTarget == 0) { - errs() << ProgName << ": error: unable to get target for '" << TripleName - << "', see --version and --triple.\n"; + const Target *TheTarget = GetTarget(ProgName); + if (!TheTarget) return 0; - } std::string ErrorMessage; |