Add a clear() operation to MCInst, to drop all of its operands. Useful for the disas...
authorOwen Anderson <resistor@mac.com>
Mon, 1 Aug 2011 18:43:18 +0000 (18:43 +0000)
committerOwen Anderson <resistor@mac.com>
Mon, 1 Aug 2011 18:43:18 +0000 (18:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136634 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCInst.h

index d6ef7b4c33c1f0e03c59742e275dec8ac3af42db..5d34ccec72618fc79d65854089a013e818064bd0 100644 (file)
@@ -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;