[llvm-commits] [llvm] r80230 - /llvm/trunk/tools/llvm-mc/llvm-mc.cpp
Daniel Dunbar
daniel at zuster.org
Thu Aug 27 00:56:40 PDT 2009
Author: ddunbar
Date: Thu Aug 27 02:56:39 2009
New Revision: 80230
URL: http://llvm.org/viewvc/llvm-project?rev=80230&view=rev
Log:
llvm-mc: Only show instruction encodings with --show-encoding.
Modified:
llvm/trunk/tools/llvm-mc/llvm-mc.cpp
Modified: llvm/trunk/tools/llvm-mc/llvm-mc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/llvm-mc.cpp?rev=80230&r1=80229&r2=80230&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mc/llvm-mc.cpp (original)
+++ llvm/trunk/tools/llvm-mc/llvm-mc.cpp Thu Aug 27 02:56:39 2009
@@ -39,6 +39,9 @@
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 @@
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!");
More information about the llvm-commits
mailing list