summaryrefslogtreecommitdiff
path: root/tools/llvm-mc/llvm-mc.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-02-03 18:18:30 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-02-03 18:18:30 +0000
commit9dee8e3009408fd08c656558397a8ac8604139ba (patch)
tree2aaa0008a2e4465f77b61deaa8083d5adc0d422c /tools/llvm-mc/llvm-mc.cpp
parent523e3928a340dfd6645b4fc8e861c2d883728227 (diff)
downloadllvm-9dee8e3009408fd08c656558397a8ac8604139ba.tar.gz
llvm-9dee8e3009408fd08c656558397a8ac8604139ba.tar.bz2
llvm-9dee8e3009408fd08c656558397a8ac8604139ba.tar.xz
llvm-mc: Add --show-inst option, for showing the MCInst inline with the assembly
output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc/llvm-mc.cpp')
-rw-r--r--tools/llvm-mc/llvm-mc.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp
index 342ae99b53..c05bd522c5 100644
--- a/tools/llvm-mc/llvm-mc.cpp
+++ b/tools/llvm-mc/llvm-mc.cpp
@@ -46,6 +46,9 @@ OutputFilename("o", cl::desc("Output filename"),
static cl::opt<bool>
ShowEncoding("show-encoding", cl::desc("Show instruction encodings"));
+static cl::opt<bool>
+ShowInst("show-inst", cl::desc("Show internal instruction representation"));
+
static cl::opt<unsigned>
OutputAsmVariant("output-asm-variant",
cl::desc("Syntax variant to use for output printing"));
@@ -266,7 +269,8 @@ static int AssembleInput(const char *ProgName) {
CE.reset(TheTarget->createCodeEmitter(*TM));
Str.reset(createAsmStreamer(Ctx, *Out, *MAI,
TM->getTargetData()->isLittleEndian(),
- /*asmverbose*/true, IP.get(), CE.get()));
+ /*asmverbose*/true, IP.get(), CE.get(),
+ ShowInst));
} else {
assert(FileType == OFT_ObjectFile && "Invalid file type!");
CE.reset(TheTarget->createCodeEmitter(*TM));