summaryrefslogtreecommitdiff
path: root/include/llvm/Support/TargetFolder.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-08-11 17:57:01 +0000
committerDan Gohman <gohman@apple.com>2009-08-11 17:57:01 +0000
commite2574d3215c412a15763d26aee9aa5d856764c2c (patch)
treec5d94d9987841e646bbffadceb943480cd203296 /include/llvm/Support/TargetFolder.h
parent7cd0118c367314308cf94765ac12f81020a56271 (diff)
downloadllvm-e2574d3215c412a15763d26aee9aa5d856764c2c.tar.gz
llvm-e2574d3215c412a15763d26aee9aa5d856764c2c.tar.bz2
llvm-e2574d3215c412a15763d26aee9aa5d856764c2c.tar.xz
Add convenience functions for creating inbounds GEPs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78695 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/TargetFolder.h')
-rw-r--r--include/llvm/Support/TargetFolder.h9
1 files changed, 9 insertions, 0 deletions
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
//===--------------------------------------------------------------------===//