X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FIR%2FConstantFolder.h;h=fb6ca3b3184c8b35699f8f3989b600c067a707d2;hb=00552e3875ee5f382db6c98286a241a7d0efe1b8;hp=aba38462c8ba109f3de369e124fa4400eddfab35;hpb=19443c1bcb863ba186abfe0bda3a1603488d17f7;p=oota-llvm.git diff --git a/include/llvm/IR/ConstantFolder.h b/include/llvm/IR/ConstantFolder.h index aba38462c8b..fb6ca3b3184 100644 --- a/include/llvm/IR/ConstantFolder.h +++ b/include/llvm/IR/ConstantFolder.h @@ -118,34 +118,35 @@ public: // Memory Instructions //===--------------------------------------------------------------------===// - Constant *CreateGetElementPtr(Constant *C, + Constant *CreateGetElementPtr(Type *Ty, Constant *C, ArrayRef IdxList) const { - return ConstantExpr::getGetElementPtr(nullptr, C, IdxList); + return ConstantExpr::getGetElementPtr(Ty, C, IdxList); } - Constant *CreateGetElementPtr(Constant *C, Constant *Idx) const { + Constant *CreateGetElementPtr(Type *Ty, Constant *C, Constant *Idx) const { // This form of the function only exists to avoid ambiguous overload // warnings about whether to convert Idx to ArrayRef or // ArrayRef. - return ConstantExpr::getGetElementPtr(nullptr, C, Idx); + return ConstantExpr::getGetElementPtr(Ty, C, Idx); } - Constant *CreateGetElementPtr(Constant *C, + Constant *CreateGetElementPtr(Type *Ty, Constant *C, ArrayRef IdxList) const { - return ConstantExpr::getGetElementPtr(nullptr, C, IdxList); + return ConstantExpr::getGetElementPtr(Ty, C, IdxList); } - Constant *CreateInBoundsGetElementPtr(Constant *C, + Constant *CreateInBoundsGetElementPtr(Type *Ty, Constant *C, ArrayRef IdxList) const { - return ConstantExpr::getInBoundsGetElementPtr(nullptr, C, IdxList); + return ConstantExpr::getInBoundsGetElementPtr(Ty, C, IdxList); } - Constant *CreateInBoundsGetElementPtr(Constant *C, Constant *Idx) const { + Constant *CreateInBoundsGetElementPtr(Type *Ty, Constant *C, + Constant *Idx) const { // This form of the function only exists to avoid ambiguous overload // warnings about whether to convert Idx to ArrayRef or // ArrayRef. - return ConstantExpr::getInBoundsGetElementPtr(nullptr, C, Idx); + return ConstantExpr::getInBoundsGetElementPtr(Ty, C, Idx); } - Constant *CreateInBoundsGetElementPtr(Constant *C, + Constant *CreateInBoundsGetElementPtr(Type *Ty, Constant *C, ArrayRef IdxList) const { - return ConstantExpr::getInBoundsGetElementPtr(nullptr, C, IdxList); + return ConstantExpr::getInBoundsGetElementPtr(Ty, C, IdxList); } //===--------------------------------------------------------------------===//