From: Owen Anderson Date: Mon, 1 Aug 2011 18:43:18 +0000 (+0000) Subject: Add a clear() operation to MCInst, to drop all of its operands. Useful for the disas... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=423b81e6924f882f8b1cf7a7d4126b25b5f915aa;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136634 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/MC/MCInst.h b/include/llvm/MC/MCInst.h index d6ef7b4c33c..5d34ccec726 100644 --- a/include/llvm/MC/MCInst.h +++ b/include/llvm/MC/MCInst.h @@ -144,6 +144,8 @@ public: Operands.push_back(Op); } + void clear() { Operands.clear(); } + void print(raw_ostream &OS, const MCAsmInfo *MAI) const; void dump() const;