summaryrefslogtreecommitdiffstats
path: root/llvm/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
commite3ee332fe090b86910fbf59496788878b93cff38 (patch)
tree1554e909f8857472ad0d634547680b26d177d2e8 /llvm/tools/llvm-mc/llvm-mc.cpp
parentb247350ef7dde892dcdd047a9077f78b6bc783d1 (diff)
downloadbcm5719-llvm-e3ee332fe090b86910fbf59496788878b93cff38.tar.gz
bcm5719-llvm-e3ee332fe090b86910fbf59496788878b93cff38.zip
llvm-mc: Add --show-inst option, for showing the MCInst inline with the assembly
output. llvm-svn: 95227
Diffstat (limited to 'llvm/tools/llvm-mc/llvm-mc.cpp')
-rw-r--r--llvm/tools/llvm-mc/llvm-mc.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/tools/llvm-mc/llvm-mc.cpp b/llvm/tools/llvm-mc/llvm-mc.cpp
index 342ae99b537..c05bd522c52 100644
--- a/llvm/tools/llvm-mc/llvm-mc.cpp
+++ b/llvm/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));
OpenPOWER on IntegriCloud