diff options
author | Dan Gohman <dan433584@gmail.com> | 2015-12-21 16:50:41 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2015-12-21 16:50:41 +0000 |
commit | dd20c70b61103e4f8ea0ee0a9cfcdaa004797780 (patch) | |
tree | 70fe08fc9c253ee4e55b0aed005c5732804a3b12 | |
parent | 216e0c2ffe194535a180258d114d90213dfd989e (diff) | |
download | bcm5719-llvm-dd20c70b61103e4f8ea0ee0a9cfcdaa004797780.tar.gz bcm5719-llvm-dd20c70b61103e4f8ea0ee0a9cfcdaa004797780.zip |
[WebAssembly] Add some comments and make some minor source cleanups.
llvm-svn: 256164
-rw-r--r-- | llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp b/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp index 3a151dec16f..7ce3a00ae36 100644 --- a/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp +++ b/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp @@ -24,7 +24,6 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/FormattedStream.h" #include "llvm/Target/TargetRegisterInfo.h" -#include <cctype> using namespace llvm; #define DEBUG_TYPE "asm-printer" @@ -46,17 +45,19 @@ void WebAssemblyInstPrinter::printRegName(raw_ostream &OS, void WebAssemblyInstPrinter::printInst(const MCInst *MI, raw_ostream &OS, StringRef Annot, const MCSubtargetInfo & /*STI*/) { + // Print the instruction (this uses the AsmStrings from the .td files). printInstruction(MI, OS); + // Print any additional variadic operands. const MCInstrDesc &Desc = MII.get(MI->getOpcode()); if (Desc.isVariadic()) - for (unsigned i = Desc.getNumOperands(), e = MI->getNumOperands(); i < e; - ++i) { + for (auto i = Desc.getNumOperands(), e = MI->getNumOperands(); i < e; ++i) { if (i != 0) OS << ", "; printOperand(MI, i, OS); } + // Print any added annotation. printAnnotation(OS, Annot); } |