diff options
| author | Jay Foad <jay.foad@gmail.com> | 2011-04-11 09:48:55 +0000 |
|---|---|---|
| committer | Jay Foad <jay.foad@gmail.com> | 2011-04-11 09:48:55 +0000 |
| commit | 0159a1ee114f86ef1307f8f598977700fd10d7fe (patch) | |
| tree | 7ea0a100b8d3377bbd1efb6c4fe9f2a867d8077f /llvm | |
| parent | 7c14a558fe59ca86925f6a28f1f07c69490efdd8 (diff) | |
| download | bcm5719-llvm-0159a1ee114f86ef1307f8f598977700fd10d7fe.tar.gz bcm5719-llvm-0159a1ee114f86ef1307f8f598977700fd10d7fe.zip | |
Fix or remove code which seemed to think that the operand of a Constant
was always a User.
llvm-svn: 129272
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/Constant.h | 13 | ||||
| -rw-r--r-- | llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 2 |
2 files changed, 1 insertions, 14 deletions
diff --git a/llvm/include/llvm/Constant.h b/llvm/include/llvm/Constant.h index 38045fc0c1d..5f32ce0ac5e 100644 --- a/llvm/include/llvm/Constant.h +++ b/llvm/include/llvm/Constant.h @@ -47,10 +47,6 @@ protected: : User(ty, vty, Ops, NumOps) {} void destroyConstantImpl(); - - void setOperand(unsigned i, Value *V) { - User::setOperand(i, V); - } public: /// isNullValue - Return true if this is the value that would be returned by /// getNullValue. @@ -90,15 +86,6 @@ public: /// FIXME: This really should not be in VMCore. PossibleRelocationsTy getRelocationInfo() const; - // Specialize get/setOperand for Users as their operands are always - // constants or BasicBlocks as well. - User *getOperand(unsigned i) { - return static_cast<User*>(User::getOperand(i)); - } - const User *getOperand(unsigned i) const { - return static_cast<const User*>(User::getOperand(i)); - } - /// getVectorElements - This method, which is only valid on constant of vector /// type, returns the elements of the vector in the specified smallvector. /// This handles breaking down a vector undef into undef elements, etc. For diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp index 05078caf5fa..54404cd03aa 100644 --- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -423,7 +423,7 @@ void ValueEnumerator::EnumerateOperandType(const Value *V) { // This constant may have operands, make sure to enumerate the types in // them. for (unsigned i = 0, e = C->getNumOperands(); i != e; ++i) { - const User *Op = C->getOperand(i); + const Value *Op = C->getOperand(i); // Don't enumerate basic blocks here, this happens as operands to // blockaddress. |

