From 053ffe81090ab2e8b10fd39d9625e15e696dd567 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Mon, 11 Jul 2011 20:40:56 +0000 Subject: [PATCH] Disassembler doesn't need TargetMachine anymore. llvm-svn: 134920 --- tools/llvm-mc/llvm-mc.cpp | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index c98641a33a7..7fed125e1bf 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -415,23 +415,6 @@ static int DisassembleInput(const char *ProgName, bool Enhanced) { Res = Disassembler::disassembleEnhanced(TripleName, *Buffer.take(), Out->os()); } else { - // Package up features to be passed to target/subtarget - std::string FeaturesStr; - - // 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). - OwningPtr TM(TheTarget->createTargetMachine(TripleName, - MCPU, - FeaturesStr)); - - if (!TM) { - errs() << ProgName << ": error: could not create target for triple '" - << TripleName << "'.\n"; - return 1; - } - Res = Disassembler::disassemble(*TheTarget, TripleName, *Buffer.take(), Out->os()); }