make the Op<N> methods protected, how it was intended to be
[oota-llvm.git] / include / llvm / User.h
index bb1a862c86070650af3e97bf1f5d5a670a1c72fc..f2df23e34125570414dca070f1b9b4c7d54d2b13 100644 (file)
@@ -82,12 +82,14 @@ public:
   void operator delete(void*, unsigned) {
     assert(0 && "Constructor throws?");
   }
+protected:
   template <unsigned Idx> Use &Op() {
     return OperandTraits<User>::op_begin(this)[Idx];
   }
   template <unsigned Idx> const Use &Op() const {
     return OperandTraits<User>::op_begin(const_cast<User*>(this))[Idx];
   }
+public:
   Value *getOperand(unsigned i) const {
     assert(i < NumOperands && "getOperand() out of range!");
     return OperandList[i];