From 902a7b529820e6a0aa85f98f21afaeb1805a22f8 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 19 Aug 2012 10:31:50 +0000 Subject: Vendor import of llvm trunk r162107: http://llvm.org/svn/llvm-project/llvm/trunk@162107 --- include/llvm/Support/NoFolder.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/llvm/Support/NoFolder.h') diff --git a/include/llvm/Support/NoFolder.h b/include/llvm/Support/NoFolder.h index 75c1a79265e2..8e41a64b1770 100644 --- a/include/llvm/Support/NoFolder.h +++ b/include/llvm/Support/NoFolder.h @@ -181,6 +181,12 @@ public: ArrayRef 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 or + // ArrayRef. + return ConstantExpr::getGetElementPtr(C, Idx); + } Instruction *CreateGetElementPtr(Constant *C, ArrayRef IdxList) const { return GetElementPtrInst::Create(C, IdxList); @@ -190,6 +196,12 @@ public: ArrayRef 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 or + // ArrayRef. + return ConstantExpr::getInBoundsGetElementPtr(C, Idx); + } Instruction *CreateInBoundsGetElementPtr(Constant *C, ArrayRef IdxList) const { return GetElementPtrInst::CreateInBounds(C, IdxList); -- cgit v1.2.3