[llvm-commits] CVS: llvm/include/llvm/Support/ValueHolder.h

Chris Lattner lattner at cs.uiuc.edu
Sat Aug 23 15:07:01 PDT 2003


Changes in directory llvm/include/llvm/Support:

ValueHolder.h updated: 1.2 -> 1.3

---
Log message:

Of course, the copy ctor really should copy the operand as well


---
Diffs of the changes:

Index: llvm/include/llvm/Support/ValueHolder.h
diff -u llvm/include/llvm/Support/ValueHolder.h:1.2 llvm/include/llvm/Support/ValueHolder.h:1.3
--- llvm/include/llvm/Support/ValueHolder.h:1.2	Sat Aug 23 14:51:10 2003
+++ llvm/include/llvm/Support/ValueHolder.h	Sat Aug 23 15:06:38 2003
@@ -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) {





More information about the llvm-commits mailing list