llvm-mc: Add -show-inst-operands, for dumping the parsed instruction representation before matching.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110791 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp
index 33531f1..94b11eb 100644
--- a/tools/llvm-mc/llvm-mc.cpp
+++ b/tools/llvm-mc/llvm-mc.cpp
@@ -51,6 +51,10 @@
static cl::opt<bool>
ShowInst("show-inst", cl::desc("Show internal instruction representation"));
+static cl::opt<bool>
+ShowInstOperands("show-inst-operands",
+ cl::desc("Show instructions operands as parsed"));
+
static cl::opt<unsigned>
OutputAsmVariant("output-asm-variant",
cl::desc("Syntax variant to use for output printing"));
@@ -320,6 +324,7 @@
return 1;
}
+ Parser->setShowParsedOperands(ShowInstOperands);
Parser->setTargetParser(*TAP.get());
int Res = Parser->Run(NoInitialTextSection);