diff options
author | Chris Lattner <sabre@nondot.org> | 2003-08-23 19:51:10 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-08-23 19:51:10 +0000 |
commit | 8518e74f3e24b136c627534e30b0068836785575 (patch) | |
tree | 5ae70c2b6e98a6981a0063d036a31af6b6a65cb4 | |
parent | 88e1eef1ed11ac2d21a5500062805123c4393342 (diff) |
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
-rw-r--r-- | include/llvm/Support/ValueHolder.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Support/ValueHolder.h b/include/llvm/Support/ValueHolder.h index 33fda2c341..aacdb5b75e 100644 --- a/include/llvm/Support/ValueHolder.h +++ b/include/llvm/Support/ValueHolder.h @@ -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"; } |