diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-07-21 09:19:11 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-07-21 09:19:11 +0000 |
commit | 14732a1f42e9df9c4ca4f6403f67de27b563fcbb (patch) | |
tree | d5c63537f49b32db4549b032ba90bfe196d050ad /include/llvm/Support | |
parent | 12fc16f1950796486988dc91ba69797efa5bdb64 (diff) | |
download | external_llvm-14732a1f42e9df9c4ca4f6403f67de27b563fcbb.zip external_llvm-14732a1f42e9df9c4ca4f6403f67de27b563fcbb.tar.gz external_llvm-14732a1f42e9df9c4ca4f6403f67de27b563fcbb.tar.bz2 |
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
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/TargetFolder.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Support/TargetFolder.h b/include/llvm/Support/TargetFolder.h index 2be8b74..e6b501c 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(), |