diff options
Diffstat (limited to 'llvm/include/llvm/User.h')
-rw-r--r-- | llvm/include/llvm/User.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/include/llvm/User.h b/llvm/include/llvm/User.h index 0f1dcfe7a09..77bba9de64a 100644 --- a/llvm/include/llvm/User.h +++ b/llvm/include/llvm/User.h @@ -25,6 +25,7 @@ namespace llvm { class User : public Value { User(const User &); // Do not implement + void *operator new(size_t); // Do not implement protected: /// OperandList - This is a pointer to the array of Users for this operand. /// For nodes of fixed arity (e.g. a binary operator) this array will live @@ -38,10 +39,13 @@ protected: /// unsigned NumOperands; -public: + void *operator new(size_t s, unsigned) { + return ::operator new(s); + } User(const Type *Ty, unsigned vty, Use *OpList, unsigned NumOps) : Value(Ty, vty), OperandList(OpList), NumOperands(NumOps) {} +public: Value *getOperand(unsigned i) const { assert(i < NumOperands && "getOperand() out of range!"); return OperandList[i]; |