summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-07-21 09:19:11 +0000
committerJay Foad <jay.foad@gmail.com>2011-07-21 09:19:11 +0000
commit14732a1f42e9df9c4ca4f6403f67de27b563fcbb (patch)
treed5c63537f49b32db4549b032ba90bfe196d050ad
parent12fc16f1950796486988dc91ba69797efa5bdb64 (diff)
downloadllvm-14732a1f42e9df9c4ca4f6403f67de27b563fcbb.tar.gz
llvm-14732a1f42e9df9c4ca4f6403f67de27b563fcbb.tar.bz2
llvm-14732a1f42e9df9c4ca4f6403f67de27b563fcbb.tar.xz
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
-rw-r--r--include/llvm/Support/TargetFolder.h6
1 files changed, 6 insertions, 0 deletions
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<Constant *> or
+ // ArrayRef<Value *>.
+ return Fold(ConstantExpr::getInBoundsGetElementPtr(C, &Idx, 1));
+ }
Constant *CreateInBoundsGetElementPtr(Constant *C,
ArrayRef<Value *> IdxList) const {
return Fold(ConstantExpr::getInBoundsGetElementPtr(C, IdxList.data(),