diff options
author | Owen Anderson <resistor@mac.com> | 2011-08-01 18:43:18 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-08-01 18:43:18 +0000 |
commit | 423b81e6924f882f8b1cf7a7d4126b25b5f915aa (patch) | |
tree | 19860d3ff703c3499b81207286a20cb185cbd660 | |
parent | 965b891762b4ec62475a7859a7c8453427064ff9 (diff) | |
download | llvm-423b81e6924f882f8b1cf7a7d4126b25b5f915aa.tar.gz llvm-423b81e6924f882f8b1cf7a7d4126b25b5f915aa.tar.bz2 llvm-423b81e6924f882f8b1cf7a7d4126b25b5f915aa.tar.xz |
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
-rw-r--r-- | include/llvm/MC/MCInst.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/MC/MCInst.h b/include/llvm/MC/MCInst.h index d6ef7b4c33..5d34ccec72 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; |