summaryrefslogtreecommitdiff
path: root/tools/llvm-objdump
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-07-06 19:45:42 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-07-06 19:45:42 +0000
commitb262799d49891b036daa00eddf51947487346c98 (patch)
tree0115b07f55301c1309395edfe067cd14e572861c /tools/llvm-objdump
parenta3574fb7e5b7b4517eb81c8c76f05e5be05eec1b (diff)
downloadllvm-b262799d49891b036daa00eddf51947487346c98.tar.gz
llvm-b262799d49891b036daa00eddf51947487346c98.tar.bz2
llvm-b262799d49891b036daa00eddf51947487346c98.tar.xz
createMCInstPrinter doesn't need TargetMachine anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134525 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-objdump')
-rw-r--r--tools/llvm-objdump/llvm-objdump.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp
index a125c91c35..9cb3fee805 100644
--- a/tools/llvm-objdump/llvm-objdump.cpp
+++ b/tools/llvm-objdump/llvm-objdump.cpp
@@ -38,7 +38,6 @@
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/system_error.h"
-#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetRegistry.h"
#include "llvm/Target/TargetSelect.h"
#include <algorithm>
@@ -196,22 +195,9 @@ static void DisassembleInput(const StringRef &Filename) {
return;
}
- // FIXME: We shouldn't need to do this (and link in codegen).
- // When we split this out, we should do it in a way that makes
- // it straightforward to switch subtargets on the fly (.e.g,
- // the .cpu and .code16 directives).
- std::string FeaturesStr;
- std::string CPU;
- OwningPtr<TargetMachine> TM(TheTarget->createTargetMachine(TripleName, CPU,
- FeaturesStr));
- if (!TM) {
- errs() << "error: could not create target for triple " << TripleName << "\n";
- return;
- }
-
int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
OwningPtr<MCInstPrinter> IP(TheTarget->createMCInstPrinter(
- *TM, AsmPrinterVariant, *AsmInfo));
+ AsmPrinterVariant, *AsmInfo));
if (!IP) {
errs() << "error: no instruction printer for target " << TripleName << '\n';
return;