summaryrefslogtreecommitdiff
path: root/tools/llvm-mc/Disassembler.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-13 18:41:17 +0000
committerChris Lattner <sabre@nondot.org>2010-04-13 18:41:17 +0000
commitf23c7692947cfa69934476979941e91e5d945daa (patch)
tree5ab25e2775fb480ffb3e7579eec2e38a964ce470 /tools/llvm-mc/Disassembler.cpp
parent97e6992e3ecfd354a53142f0488769b399242295 (diff)
downloadllvm-f23c7692947cfa69934476979941e91e5d945daa.tar.gz
llvm-f23c7692947cfa69934476979941e91e5d945daa.tar.bz2
llvm-f23c7692947cfa69934476979941e91e5d945daa.tar.xz
Make the disassembler respect the assembler dialect when printing instructions,
patch by Marius Wachtler! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101160 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc/Disassembler.cpp')
-rw-r--r--tools/llvm-mc/Disassembler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/llvm-mc/Disassembler.cpp b/tools/llvm-mc/Disassembler.cpp
index 4a63e99a6e..9234a14bc1 100644
--- a/tools/llvm-mc/Disassembler.cpp
+++ b/tools/llvm-mc/Disassembler.cpp
@@ -142,7 +142,9 @@ int Disassembler::disassemble(const Target &T, const std::string &Triple,
return -1;
}
- OwningPtr<MCInstPrinter> IP(T.createMCInstPrinter(0, *AsmInfo));
+ int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
+ OwningPtr<MCInstPrinter> IP(T.createMCInstPrinter(AsmPrinterVariant,
+ *AsmInfo));
if (!IP) {
errs() << "error: no instruction printer for target " << Triple << '\n';
return -1;