summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mc/Disassembler.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-03-21 04:13:46 +0000
committerBill Wendling <isanbard@gmail.com>2011-03-21 04:13:46 +0000
commit00f0cddfd47ec852db8a5b609ce44e513577e979 (patch)
tree90a1cebb90d52f0964ce9cac228c4f159ac06917 /llvm/tools/llvm-mc/Disassembler.cpp
parent701822a48e4c82c5a08f97fce97da683f6e29105 (diff)
downloadbcm5719-llvm-00f0cddfd47ec852db8a5b609ce44e513577e979.tar.gz
bcm5719-llvm-00f0cddfd47ec852db8a5b609ce44e513577e979.zip
We need to pass the TargetMachine object to the InstPrinter if we are printing
the alias of an InstAlias instead of the thing being aliased. Because we need to know the features that are valid for an InstAlias. This is part of a work-in-progress. llvm-svn: 127986
Diffstat (limited to 'llvm/tools/llvm-mc/Disassembler.cpp')
-rw-r--r--llvm/tools/llvm-mc/Disassembler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/tools/llvm-mc/Disassembler.cpp b/llvm/tools/llvm-mc/Disassembler.cpp
index d98b57ebc65..41b92a1b302 100644
--- a/llvm/tools/llvm-mc/Disassembler.cpp
+++ b/llvm/tools/llvm-mc/Disassembler.cpp
@@ -127,7 +127,8 @@ static bool ByteArrayFromString(ByteArrayTy &ByteArray,
return false;
}
-int Disassembler::disassemble(const Target &T, const std::string &Triple,
+int Disassembler::disassemble(const Target &T, TargetMachine &TM,
+ const std::string &Triple,
MemoryBuffer &Buffer,
raw_ostream &Out) {
// Set up disassembler.
@@ -145,7 +146,7 @@ int Disassembler::disassemble(const Target &T, const std::string &Triple,
}
int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
- OwningPtr<MCInstPrinter> IP(T.createMCInstPrinter(AsmPrinterVariant,
+ OwningPtr<MCInstPrinter> IP(T.createMCInstPrinter(TM, AsmPrinterVariant,
*AsmInfo));
if (!IP) {
errs() << "error: no instruction printer for target " << Triple << '\n';
OpenPOWER on IntegriCloud