mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-02 16:56:50 +00:00
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:
parent
88e1eef1ed
commit
8518e74f3e
@ -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";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user