From 2d710ff7cffd1abad106e960d5a1f41233d08ee5 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 23 Aug 2003 20:06:38 +0000 Subject: [PATCH] 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 --- include/llvm/Support/ValueHolder.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/llvm/Support/ValueHolder.h b/include/llvm/Support/ValueHolder.h index aacdb5b75e5..cba246351f8 100644 --- a/include/llvm/Support/ValueHolder.h +++ b/include/llvm/Support/ValueHolder.h @@ -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) { -- 2.34.1