From: Chris Lattner Date: Sat, 31 Jan 2009 07:34:19 +0000 (+0000) Subject: add accessors X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=bda9dfd5ab20fbefc9b0d563e7556f7cddc247d7;p=oota-llvm.git add accessors git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63478 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/User.h b/include/llvm/User.h index 919693e0829..e25d19b563f 100644 --- a/include/llvm/User.h +++ b/include/llvm/User.h @@ -100,6 +100,15 @@ public: "Cannot mutate a constant with setOperand!"); OperandList[i] = Val; } + const Use &getOperandUse(unsigned i) const { + assert(i < NumOperands && "getOperand() out of range!"); + return OperandList[i]; + } + Use &getOperandUse(unsigned i) { + assert(i < NumOperands && "getOperand() out of range!"); + return OperandList[i]; + } + unsigned getNumOperands() const { return NumOperands; } // ---------------------------------------------------------------------------