diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-09 23:48:35 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-09 23:48:35 +0000 |
commit | 333c40096561218bc3597cf153c0a3895274414c (patch) | |
tree | bc6f5f739c43dec91104275aec30e16f30a7610e /include/llvm/InstrTypes.h | |
parent | 53674361efd42f9dd7c4d293132106839ab3b893 (diff) | |
download | llvm-333c40096561218bc3597cf153c0a3895274414c.tar.gz llvm-333c40096561218bc3597cf153c0a3895274414c.tar.bz2 llvm-333c40096561218bc3597cf153c0a3895274414c.tar.xz |
This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/InstrTypes.h')
-rw-r--r-- | include/llvm/InstrTypes.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h index 0a018de5e9..76827191f1 100644 --- a/include/llvm/InstrTypes.h +++ b/include/llvm/InstrTypes.h @@ -22,6 +22,8 @@ namespace llvm { +class LLVMContext; + //===----------------------------------------------------------------------===// // TerminatorInst Class //===----------------------------------------------------------------------===// @@ -50,7 +52,7 @@ protected: virtual void setSuccessorV(unsigned idx, BasicBlock *B) = 0; public: - virtual Instruction *clone() const = 0; + virtual Instruction *clone(LLVMContext &Context) const = 0; /// getNumSuccessors - Return the number of successors that this terminator /// has. @@ -235,7 +237,7 @@ public: return static_cast<BinaryOps>(Instruction::getOpcode()); } - virtual BinaryOperator *clone() const; + virtual BinaryOperator *clone(LLVMContext &Context) const; /// swapOperands - Exchange the two operands to this instruction. /// This instruction is safe to use on any binary instruction and @@ -569,7 +571,8 @@ public: /// instruction into a BasicBlock right before the specified instruction. /// The specified Instruction is allowed to be a dereferenced end iterator. /// @brief Create a CmpInst - static CmpInst *Create(OtherOps Op, unsigned short predicate, Value *S1, + static CmpInst *Create(LLVMContext &Context, OtherOps Op, + unsigned short predicate, Value *S1, Value *S2, const std::string &Name = "", Instruction *InsertBefore = 0); @@ -660,13 +663,6 @@ public: static inline bool classof(const Value *V) { return isa<Instruction>(V) && classof(cast<Instruction>(V)); } - /// @brief Create a result type for fcmp/icmp - static const Type* makeCmpResultType(const Type* opnd_type) { - if (const VectorType* vt = dyn_cast<const VectorType>(opnd_type)) { - return VectorType::get(Type::Int1Ty, vt->getNumElements()); - } - return Type::Int1Ty; - } }; |