diff options
Diffstat (limited to 'llvm/lib/VMCore/Constants.cpp')
-rw-r--r-- | llvm/lib/VMCore/Constants.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp index f6d8e86850f..71e98377738 100644 --- a/llvm/lib/VMCore/Constants.cpp +++ b/llvm/lib/VMCore/Constants.cpp @@ -475,11 +475,8 @@ public: static GetElementPtrConstantExpr *Create(Constant *C, const std::vector<Constant*>&IdxList, const Type *DestTy) { - GetElementPtrConstantExpr *Result = new(IdxList.size() + 1) - GetElementPtrConstantExpr(C, IdxList, DestTy); - // Getelementptr defaults to having no pointer overflow. - cast<GEPOperator>(Result)->setHasNoPointerOverflow(true); - return Result; + return + new(IdxList.size() + 1) GetElementPtrConstantExpr(C, IdxList, DestTy); } /// Transparently provide more efficient getOperand methods. DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); |