diff options
Diffstat (limited to 'tools/llvm-mc/llvm-mc.cpp')
-rw-r--r-- | tools/llvm-mc/llvm-mc.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index 342ae99..76ce080 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")); @@ -263,13 +266,14 @@ static int AssembleInput(const char *ProgName) { if (FileType == OFT_AssemblyFile) { IP.reset(TheTarget->createMCInstPrinter(OutputAsmVariant, *MAI, *Out)); if (ShowEncoding) - CE.reset(TheTarget->createCodeEmitter(*TM)); + CE.reset(TheTarget->createCodeEmitter(*TM, Ctx)); 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)); + CE.reset(TheTarget->createCodeEmitter(*TM, Ctx)); Str.reset(createMachOStreamer(Ctx, *Out, CE.get())); } |