[llvm-commits] [llvm] r136634 - /llvm/trunk/include/llvm/MC/MCInst.h
Owen Anderson
resistor at mac.com
Mon Aug 1 11:43:19 PDT 2011
Author: resistor
Date: Mon Aug 1 13:43:18 2011
New Revision: 136634
URL: http://llvm.org/viewvc/llvm-project?rev=136634&view=rev
Log:
Add a clear() operation to MCInst, to drop all of its operands. Useful for the disassembler, where we may realize fairly late into decoding that something is wrong and need to reset.
Modified:
llvm/trunk/include/llvm/MC/MCInst.h
Modified: llvm/trunk/include/llvm/MC/MCInst.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCInst.h?rev=136634&r1=136633&r2=136634&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCInst.h (original)
+++ llvm/trunk/include/llvm/MC/MCInst.h Mon Aug 1 13:43:18 2011
@@ -144,6 +144,8 @@
Operands.push_back(Op);
}
+ void clear() { Operands.clear(); }
+
void print(raw_ostream &OS, const MCAsmInfo *MAI) const;
void dump() const;
More information about the llvm-commits
mailing list