diff options
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r-- | include/llvm/Instructions.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 57cff17..71f4738 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -496,7 +496,7 @@ public: Instruction *InsertBefore = 0) { GetElementPtrInst *GEP = Create(Ptr, IdxBegin, IdxEnd, NameStr, InsertBefore); - GEP->setIsInBounds(true); + cast<GEPOperator>(GEP)->setIsInBounds(true); return GEP; } template<typename InputIterator> @@ -507,21 +507,21 @@ public: BasicBlock *InsertAtEnd) { GetElementPtrInst *GEP = Create(Ptr, IdxBegin, IdxEnd, NameStr, InsertAtEnd); - GEP->setIsInBounds(true); + cast<GEPOperator>(GEP)->setIsInBounds(true); return GEP; } static GetElementPtrInst *CreateInBounds(Value *Ptr, Value *Idx, const Twine &NameStr = "", Instruction *InsertBefore = 0) { GetElementPtrInst *GEP = Create(Ptr, Idx, NameStr, InsertBefore); - GEP->setIsInBounds(true); + cast<GEPOperator>(GEP)->setIsInBounds(true); return GEP; } static GetElementPtrInst *CreateInBounds(Value *Ptr, Value *Idx, const Twine &NameStr, BasicBlock *InsertAtEnd) { GetElementPtrInst *GEP = Create(Ptr, Idx, NameStr, InsertAtEnd); - GEP->setIsInBounds(true); + cast<GEPOperator>(GEP)->setIsInBounds(true); return GEP; } @@ -602,10 +602,6 @@ public: /// a constant offset between them. bool hasAllConstantIndices() const; - /// setIsInBounds - Set or clear the inbounds flag on this GEP instruction. - /// See LangRef.html for the meaning of inbounds on a getelementptr. - void setIsInBounds(bool); - // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const GetElementPtrInst *) { return true; } static inline bool classof(const Instruction *I) { |