aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/NoFolder.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/NoFolder.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/NoFolder.h')
-rw-r--r--include/llvm/Support/NoFolder.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Support/NoFolder.h b/include/llvm/Support/NoFolder.h
index b89c084b58..5333b87efd 100644
--- a/include/llvm/Support/NoFolder.h
+++ b/include/llvm/Support/NoFolder.h
@@ -126,6 +126,15 @@ public:
return GetElementPtrInst::Create(C, IdxList, IdxList+NumIdx);
}
+ Constant *CreateInBoundsGetElementPtr(Constant *C, Constant* const *IdxList,
+ unsigned NumIdx) const {
+ return ConstantExpr::getInBoundsGetElementPtr(C, IdxList, NumIdx);
+ }
+ Value *CreateInBoundsGetElementPtr(Constant *C, Value* const *IdxList,
+ unsigned NumIdx) const {
+ return GetElementPtrInst::CreateInBounds(C, IdxList, IdxList+NumIdx);
+ }
+
//===--------------------------------------------------------------------===//
// Cast/Conversion Operators
//===--------------------------------------------------------------------===//