Of course, the copy ctor really should copy the operand as well

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8077 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-08-23 20:06:38 +00:00
parent a0f85e56c9
commit 2d710ff7cf

View File

@ -15,13 +15,13 @@
struct ValueHolder : public User {
ValueHolder(Value *V = 0);
ValueHolder(const ValueHolder &VH) : User(VH.getType(), Value::TypeVal) {}
ValueHolder(const ValueHolder &VH) : User(VH.getType(), Value::TypeVal) {
Operands.push_back(Use(VH.get(), this));
}
// Getters...
const Value *get() const { return getOperand(0); }
operator const Value*() const { return getOperand(0); }
Value *get() { return getOperand(0); }
operator Value*() { return getOperand(0); }
Value *get() const { return (Value*)getOperand(0); }
operator Value*() const { return (Value*)getOperand(0); }
// Setters...
const ValueHolder &operator=(Value *V) {