From 14732a1f42e9df9c4ca4f6403f67de27b563fcbb Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Thu, 21 Jul 2011 09:19:11 +0000 Subject: Update llvm-gcc-4.2 and dragonegg after converting ConstantFolder APIs to use ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135672 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/TargetFolder.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/llvm/Support/TargetFolder.h b/include/llvm/Support/TargetFolder.h index 2be8b74eb6..e6b501c88e 100644 --- a/include/llvm/Support/TargetFolder.h +++ b/include/llvm/Support/TargetFolder.h @@ -152,6 +152,12 @@ public: return Fold(ConstantExpr::getInBoundsGetElementPtr(C, IdxList.data(), IdxList.size())); } + 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 Fold(ConstantExpr::getInBoundsGetElementPtr(C, &Idx, 1)); + } Constant *CreateInBoundsGetElementPtr(Constant *C, ArrayRef IdxList) const { return Fold(ConstantExpr::getInBoundsGetElementPtr(C, IdxList.data(), -- cgit v1.2.3