llvm.org GIT mirror llvm / 2d710ff
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 Chris Lattner 17 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
1414
1515 struct ValueHolder : public User {
1616 ValueHolder(Value *V = 0);
17 ValueHolder(const ValueHolder &VH) : User(VH.getType(), Value::TypeVal) {}
17 ValueHolder(const ValueHolder &VH) : User(VH.getType(), Value::TypeVal) {
18 Operands.push_back(Use(VH.get(), this));
19 }
1820
1921 // Getters...
20 const Value *get() const { return getOperand(0); }
21 operator const Value*() const { return getOperand(0); }
22 Value *get() { return getOperand(0); }
23 operator Value*() { return getOperand(0); }
22 Value *get() const { return (Value*)getOperand(0); }
23 operator Value*() const { return (Value*)getOperand(0); }
2424
2525 // Setters...
2626 const ValueHolder &operator=(Value *V) {