summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mc
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-27 07:56:39 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-27 07:56:39 +0000
commitd18dd1d5f8bcc3cdc917de5cd73abef486a1a2f9 (patch)
tree137e2c906d9441833c8467da654dd92a200cf359 /llvm/tools/llvm-mc
parent692ed1fc16f7d1cc68909e9ed39ffd75de19be27 (diff)
downloadbcm5719-llvm-d18dd1d5f8bcc3cdc917de5cd73abef486a1a2f9.tar.gz
bcm5719-llvm-d18dd1d5f8bcc3cdc917de5cd73abef486a1a2f9.zip
llvm-mc: Only show instruction encodings with --show-encoding.
llvm-svn: 80230
Diffstat (limited to 'llvm/tools/llvm-mc')
-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 ec66797abcd..f995a63d8ee 100644
--- a/llvm/tools/llvm-mc/llvm-mc.cpp
+++ b/llvm/tools/llvm-mc/llvm-mc.cpp
@@ -39,6 +39,9 @@ static cl::opt<std::string>
OutputFilename("o", cl::desc("Output filename"),
cl::value_desc("filename"));
+static cl::opt<bool>
+ShowEncoding("show-encoding", cl::desc("Show instruction encodings"));
+
enum OutputFileType {
OFT_AssemblyFile,
OFT_ObjectFile
@@ -244,7 +247,8 @@ static int AssembleInput(const char *ProgName) {
assert(TAI && "Unable to create target asm info!");
AP.reset(TheTarget->createAsmPrinter(*Out, *TM, TAI, true));
- CE.reset(TheTarget->createCodeEmitter(*TM));
+ if (ShowEncoding)
+ CE.reset(TheTarget->createCodeEmitter(*TM));
Str.reset(createAsmStreamer(Ctx, *Out, *TAI, AP.get(), CE.get()));
} else {
assert(FileType == OFT_ObjectFile && "Invalid file type!");
OpenPOWER on IntegriCloud