Add more methods to be more value-like

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8074 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-08-23 19:51:10 +00:00
parent 88e1eef1ed
commit 8518e74f3e

View File

@ -15,6 +15,7 @@
struct ValueHolder : public User {
ValueHolder(Value *V = 0);
ValueHolder(const ValueHolder &VH) : User(VH.getType(), Value::TypeVal) {}
// Getters...
const Value *get() const { return getOperand(0); }
@ -28,6 +29,11 @@ struct ValueHolder : public User {
return *this;
}
const ValueHolder &operator=(ValueHolder &VH) {
setOperand(0, VH);
return *this;
}
virtual void print(std::ostream& OS) const {
OS << "ValueHolder";
}