From 423b81e6924f882f8b1cf7a7d4126b25b5f915aa Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Mon, 1 Aug 2011 18:43:18 +0000 Subject: [PATCH] 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 --- include/llvm/MC/MCInst.h | 2 ++ 1 file changed, 2 insertions(+) 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;