Changed the fundemental architecture of Operands for Instructions. Now

Operands are maintained as a vector<Use> in the User class, and operator
iterators are provided as before.  Getting an operand no longer requires
a virtual function call.

WARNING: getOperand(x) where x >= getNumOperands() will now assert instead
of returning null!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2001-07-07 08:36:50 +00:00
parent f0d0e9c262
commit c8b25d40cb
25 changed files with 308 additions and 647 deletions

View File

@ -94,16 +94,9 @@ public:
struct InstPlaceHolderHelper : public Instruction {
InstPlaceHolderHelper(const Type *Ty) : Instruction(Ty, UserOp1, "") {}
inline virtual void dropAllReferences() {}
virtual string getOpcode() const { return "placeholder"; }
virtual Instruction *clone() const { abort(); return 0; }
// No "operands"...
virtual Value *getOperand(unsigned i) { return 0; }
virtual const Value *getOperand(unsigned i) const { return 0; }
virtual bool setOperand(unsigned i, Value *Val) { return false; }
virtual unsigned getNumOperands() const { return 0; }
};
struct BBPlaceHolderHelper : public BasicBlock {