aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/ConstantFolder.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/ConstantFolder.h
parent7cd0118c367314308cf94765ac12f81020a56271 (diff)
downloadexternal_llvm-e2574d3215c412a15763d26aee9aa5d856764c2c.tar.gz
external_llvm-e2574d3215c412a15763d26aee9aa5d856764c2c.tar.bz2
external_llvm-e2574d3215c412a15763d26aee9aa5d856764c2c.zip
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/ConstantFolder.h')
-rw-r--r--include/llvm/Support/ConstantFolder.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Support/ConstantFolder.h b/include/llvm/Support/ConstantFolder.h
index 422d1ad00d..1b5b2b7745 100644
--- a/include/llvm/Support/ConstantFolder.h
+++ b/include/llvm/Support/ConstantFolder.h
@@ -122,6 +122,15 @@ public:
return ConstantExpr::getGetElementPtr(C, IdxList, NumIdx);
}
+ Constant *CreateInBoundsGetElementPtr(Constant *C, Constant* const *IdxList,
+ unsigned NumIdx) const {
+ return ConstantExpr::getInBoundsGetElementPtr(C, IdxList, NumIdx);
+ }
+ Constant *CreateInBoundsGetElementPtr(Constant *C, Value* const *IdxList,
+ unsigned NumIdx) const {
+ return ConstantExpr::getInBoundsGetElementPtr(C, IdxList, NumIdx);
+ }
+
//===--------------------------------------------------------------------===//
// Cast/Conversion Operators
//===--------------------------------------------------------------------===//