From: Gabor Greif Date: Mon, 9 Mar 2009 19:57:49 +0000 (+0000) Subject: make the Op methods protected, how it was intended to be X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=1dfe6a00308ec766223cc17a64a76e48bdacf4db;p=oota-llvm.git make the Op methods protected, how it was intended to be git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66430 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/User.h b/include/llvm/User.h index bb1a862c860..f2df23e3412 100644 --- a/include/llvm/User.h +++ b/include/llvm/User.h @@ -82,12 +82,14 @@ public: void operator delete(void*, unsigned) { assert(0 && "Constructor throws?"); } +protected: template Use &Op() { return OperandTraits::op_begin(this)[Idx]; } template const Use &Op() const { return OperandTraits::op_begin(const_cast(this))[Idx]; } +public: Value *getOperand(unsigned i) const { assert(i < NumOperands && "getOperand() out of range!"); return OperandList[i];