From 8518e74f3e24b136c627534e30b0068836785575 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 23 Aug 2003 19:51:10 +0000 Subject: [PATCH] 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 --- include/llvm/Support/ValueHolder.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/llvm/Support/ValueHolder.h b/include/llvm/Support/ValueHolder.h index 33fda2c3414..aacdb5b75e5 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"; }