aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Constants.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-07-19 15:30:30 +0000
committerJay Foad <jay.foad@gmail.com>2011-07-19 15:30:30 +0000
commit7fc52e2d95ffa543288a2fef7ef1346ce14b1a61 (patch)
tree7432780a1fcd8b9dbd4d0eb24b315b9830c0a897 /lib/VMCore/Constants.cpp
parentb9b54ebfed02f0654897d37e8a4448d3f8087558 (diff)
downloadexternal_llvm-7fc52e2d95ffa543288a2fef7ef1346ce14b1a61.tar.gz
external_llvm-7fc52e2d95ffa543288a2fef7ef1346ce14b1a61.tar.bz2
external_llvm-7fc52e2d95ffa543288a2fef7ef1346ce14b1a61.zip
Convert ConstantFoldGetElementPtr to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135483 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Constants.cpp')
-rw-r--r--lib/VMCore/Constants.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp
index e9c049e1ce..d790c33d6a 100644
--- a/lib/VMCore/Constants.cpp
+++ b/lib/VMCore/Constants.cpp
@@ -1594,7 +1594,8 @@ Constant *ConstantExpr::getSelect(Constant *C, Constant *V1, Constant *V2) {
Constant *ConstantExpr::getGetElementPtr(Constant *C, Value* const *Idxs,
unsigned NumIdx, bool InBounds) {
- if (Constant *FC = ConstantFoldGetElementPtr(C, InBounds, Idxs, NumIdx))
+ if (Constant *FC = ConstantFoldGetElementPtr(C, InBounds,
+ makeArrayRef(Idxs, NumIdx)))
return FC; // Fold a few common cases.
// Get the result type of the getelementptr!