diff options
| author | Chris Lattner <sabre@nondot.org> | 2001-06-25 07:31:05 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2001-06-25 07:31:05 +0000 |
| commit | 3bcd6394ecd3c928d2ea05bb64cacdcae8dc677a (patch) | |
| tree | abd721b18f3210276939233081d5c4c5d2f47f52 /include/llvm/InstrTypes.h | |
| parent | 53b1c0161d7fb6e8eb4bd1c49114a5cf57258364 (diff) | |
* Rename get.*Operator to create seeing that it would have to be qualified
with the classname anyways.
* Add an isPHINode() method to Instruction
* Add getUniqueName() to SymbolTable class
* Add an insert method to ValueHolder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/InstrTypes.h')
| -rw-r--r-- | include/llvm/InstrTypes.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h index 23d6019866..6d35ed5d50 100644 --- a/include/llvm/InstrTypes.h +++ b/include/llvm/InstrTypes.h @@ -60,10 +60,10 @@ class UnaryOperator : public Instruction { Use Source; public: - // getUnaryOperator() - Construct a unary instruction, given the opcode + // create() - Construct a unary instruction, given the opcode // and its operand. // - static UnaryOperator *getUnaryOperator(unsigned Op, Value *Source); + static UnaryOperator *create(unsigned Op, Value *Source); UnaryOperator(Value *S, unsigned iType, const string &Name = "") : Instruction(S->getType(), iType, Name), Source(S, this) { @@ -71,7 +71,7 @@ public: inline ~UnaryOperator() { dropAllReferences(); } virtual Instruction *clone() const { - return getUnaryOperator(getInstType(), Source); + return create(getInstType(), Source); } virtual void dropAllReferences() { @@ -105,10 +105,11 @@ class BinaryOperator : public Instruction { Use Source1, Source2; public: - // getBinaryOperator() - Construct a binary instruction, given the opcode + // create() - Construct a binary instruction, given the opcode // and the two operands. // - static BinaryOperator *getBinaryOperator(unsigned Op, Value *S1, Value *S2); + static BinaryOperator *create(unsigned Op, Value *S1, Value *S2, + const string &Name = ""); BinaryOperator(unsigned iType, Value *S1, Value *S2, const string &Name = "") @@ -118,8 +119,8 @@ public: } inline ~BinaryOperator() { dropAllReferences(); } - virtual Instruction *clone() const { - return getBinaryOperator(getInstType(), Source1, Source2); + virtual Instruction *clone() const { + return create(getInstType(), Source1, Source2); } virtual void dropAllReferences() { |
