diff options
author | dim <dim@FreeBSD.org> | 2012-08-19 10:31:50 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-19 10:31:50 +0000 |
commit | 4dc93743c9d40c29c0a3bec2aae328cac0d289e8 (patch) | |
tree | e7da40d2f6ef824f7371860826845870e6e1dcd5 /include/llvm/Support/NoFolder.h | |
parent | 721c201bd55ffb73cb2ba8d39e0570fa38c44e15 (diff) | |
download | FreeBSD-src-4dc93743c9d40c29c0a3bec2aae328cac0d289e8.zip FreeBSD-src-4dc93743c9d40c29c0a3bec2aae328cac0d289e8.tar.gz |
Vendor import of llvm trunk r162107:
http://llvm.org/svn/llvm-project/llvm/trunk@162107
Diffstat (limited to 'include/llvm/Support/NoFolder.h')
-rw-r--r-- | include/llvm/Support/NoFolder.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Support/NoFolder.h b/include/llvm/Support/NoFolder.h index 75c1a79..8e41a64 100644 --- a/include/llvm/Support/NoFolder.h +++ b/include/llvm/Support/NoFolder.h @@ -181,6 +181,12 @@ public: ArrayRef<Constant *> IdxList) const { return ConstantExpr::getGetElementPtr(C, IdxList); } + Constant *CreateGetElementPtr(Constant *C, Constant *Idx) const { + // This form of the function only exists to avoid ambiguous overload + // warnings about whether to convert Idx to ArrayRef<Constant *> or + // ArrayRef<Value *>. + return ConstantExpr::getGetElementPtr(C, Idx); + } Instruction *CreateGetElementPtr(Constant *C, ArrayRef<Value *> IdxList) const { return GetElementPtrInst::Create(C, IdxList); @@ -190,6 +196,12 @@ public: ArrayRef<Constant *> IdxList) const { return ConstantExpr::getInBoundsGetElementPtr(C, IdxList); } + Constant *CreateInBoundsGetElementPtr(Constant *C, Constant *Idx) const { + // This form of the function only exists to avoid ambiguous overload + // warnings about whether to convert Idx to ArrayRef<Constant *> or + // ArrayRef<Value *>. + return ConstantExpr::getInBoundsGetElementPtr(C, Idx); + } Instruction *CreateInBoundsGetElementPtr(Constant *C, ArrayRef<Value *> IdxList) const { return GetElementPtrInst::CreateInBounds(C, IdxList); |