typename SubClass> class SymbolTableListTraits;
class Instruction : public User {
+ void operator=(const Instruction &); // Do not implement
+ Instruction(const Instruction &); // Do not implement
+
BasicBlock *Parent;
Instruction *Prev, *Next; // Next and Prev links for our intrusive linked list
Instruction(const Type *Ty, unsigned iType, Use *Ops, unsigned NumOps,
const std::string &Name, BasicBlock *InsertAtEnd);
public:
-
- ~Instruction() {
- assert(Parent == 0 && "Instruction still linked in the program!");
- }
-
+ // Out of line virtual method, so the vtable, etc has a home.
+ ~Instruction();
+
/// mayWriteToMemory - Return true if this instruction may modify memory.
///
virtual bool mayWriteToMemory() const { return false; }
/// one of the enums that is coming soon (down below)...
///
unsigned getOpcode() const { return getValueType() - InstructionVal; }
- virtual const char *getOpcodeName() const {
+ const char *getOpcodeName() const {
return getOpcodeName(getOpcode());
}
static const char* getOpcodeName(unsigned OpCode);
void print(std::ostream &OS, AssemblyAnnotationWriter *AAW) const;
/// Methods for support type inquiry through isa, cast, and dyn_cast:
- static inline bool classof(const Instruction *I) { return true; }
+ static inline bool classof(const Instruction *) { return true; }
static inline bool classof(const Value *V) {
return V->getValueType() >= Value::InstructionVal;
}