From e2574d3215c412a15763d26aee9aa5d856764c2c Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 11 Aug 2009 17:57:01 +0000 Subject: Add convenience functions for creating inbounds GEPs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78695 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/TargetFolder.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/llvm/Support/TargetFolder.h') diff --git a/include/llvm/Support/TargetFolder.h b/include/llvm/Support/TargetFolder.h index 473b0ab03c..2569cb9019 100644 --- a/include/llvm/Support/TargetFolder.h +++ b/include/llvm/Support/TargetFolder.h @@ -138,6 +138,15 @@ public: return Fold(ConstantExpr::getGetElementPtr(C, IdxList, NumIdx)); } + Constant *CreateInBoundsGetElementPtr(Constant *C, Constant* const *IdxList, + unsigned NumIdx) const { + return Fold(ConstantExpr::getInBoundsGetElementPtr(C, IdxList, NumIdx)); + } + Constant *CreateInBoundsGetElementPtr(Constant *C, Value* const *IdxList, + unsigned NumIdx) const { + return Fold(ConstantExpr::getInBoundsGetElementPtr(C, IdxList, NumIdx)); + } + //===--------------------------------------------------------------------===// // Cast/Conversion Operators //===--------------------------------------------------------------------===// -- cgit v1.2.3