llvm-mc: Only show instruction encodings with --show-encoding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80230 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2009-08-27 07:56:39 +00:00
parent 1e1de49394
commit f2f6b0c0e9

View File

@ -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,6 +247,7 @@ static int AssembleInput(const char *ProgName) {
assert(TAI && "Unable to create target asm info!");
AP.reset(TheTarget->createAsmPrinter(*Out, *TM, TAI, true));
if (ShowEncoding)
CE.reset(TheTarget->createCodeEmitter(*TM));
Str.reset(createAsmStreamer(Ctx, *Out, *TAI, AP.get(), CE.get()));
} else {