diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h index a0376c785e5..3e9f749602d 100644 --- a/include/llvm/Instruction.h +++ b/include/llvm/Instruction.h @@ -39,12 +39,6 @@ class Instruction : public User { friend class SymbolTableListTraits >; void setParent(BasicBlock *P); - -private: - // FIXME: This is a dirty hack. Setcc instructions shouldn't encode the CC - // into the opcode field. When they don't, this will be unneeded. - void setOpcode(unsigned NewOpcode); - friend class BinaryOperator; protected: Instruction(const Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, const std::string &Name = "", diff --git a/include/llvm/Value.h b/include/llvm/Value.h index 262880a0e74..0c3ddf67053 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -48,7 +48,7 @@ class SymbolTable; /// using this Value. /// @brief LLVM Value Representation class Value { - unsigned short SubclassID; // Subclass identifier (for isa/dyn_cast) + const unsigned short SubclassID; // Subclass identifier (for isa/dyn_cast) protected: /// SubclassData - This member is defined by this class, but is not used for /// anything. Subclasses can use it to hold whatever state they find useful. @@ -186,11 +186,6 @@ public: /// getRawType - This should only be used to implement the vmcore library. /// const Type *getRawType() const { return Ty.getRawType(); } - -private: - /// FIXME: this is a gross hack, needed by another gross hack. Eliminate! - void setValueType(unsigned short VT) { SubclassID = VT; } - friend class Instruction; }; inline std::ostream &operator<<(std::ostream &OS, const Value &V) { diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp index 28912699791..b2eb87d49e9 100644 --- a/lib/VMCore/Instruction.cpp +++ b/lib/VMCore/Instruction.cpp @@ -49,10 +49,6 @@ Instruction::~Instruction() { } -void Instruction::setOpcode(unsigned opc) { - setValueType(Value::InstructionVal + opc); -} - void Instruction::setParent(BasicBlock *P) { if (getParent()) { if (!P) LeakDetector::addGarbageObject(this);