OSDN Git Service

add an accessor.
authorChris Lattner <sabre@nondot.org>
Tue, 23 Jun 2009 17:50:34 +0000 (17:50 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 23 Jun 2009 17:50:34 +0000 (17:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73966 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCInst.h

index cadc23a..11b5c79 100644 (file)
@@ -112,6 +112,7 @@ public:
   
   const MCOperand &getOperand(unsigned i) const { return Operands[i]; }
   MCOperand &getOperand(unsigned i) { return Operands[i]; }
+  unsigned getNumOperands() const { return Operands.size(); }
   
   void addOperand(const MCOperand &Op) {
     Operands.push_back(Op);