mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
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:
parent
1e1de49394
commit
f2f6b0c0e9
@ -39,6 +39,9 @@ static cl::opt<std::string>
|
|||||||
OutputFilename("o", cl::desc("Output filename"),
|
OutputFilename("o", cl::desc("Output filename"),
|
||||||
cl::value_desc("filename"));
|
cl::value_desc("filename"));
|
||||||
|
|
||||||
|
static cl::opt<bool>
|
||||||
|
ShowEncoding("show-encoding", cl::desc("Show instruction encodings"));
|
||||||
|
|
||||||
enum OutputFileType {
|
enum OutputFileType {
|
||||||
OFT_AssemblyFile,
|
OFT_AssemblyFile,
|
||||||
OFT_ObjectFile
|
OFT_ObjectFile
|
||||||
@ -244,6 +247,7 @@ static int AssembleInput(const char *ProgName) {
|
|||||||
assert(TAI && "Unable to create target asm info!");
|
assert(TAI && "Unable to create target asm info!");
|
||||||
|
|
||||||
AP.reset(TheTarget->createAsmPrinter(*Out, *TM, TAI, true));
|
AP.reset(TheTarget->createAsmPrinter(*Out, *TM, TAI, true));
|
||||||
|
if (ShowEncoding)
|
||||||
CE.reset(TheTarget->createCodeEmitter(*TM));
|
CE.reset(TheTarget->createCodeEmitter(*TM));
|
||||||
Str.reset(createAsmStreamer(Ctx, *Out, *TAI, AP.get(), CE.get()));
|
Str.reset(createAsmStreamer(Ctx, *Out, *TAI, AP.get(), CE.get()));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user