diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-07-25 09:48:08 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-07-25 09:48:08 +0000 |
commit | d1b7849d49d968a6f5398eb5534a763d42be97b8 (patch) | |
tree | 80773d650d8c3049e3a9fdc3e21597e7853925b7 /llvm/lib/Analysis/ConstantFolding.cpp | |
parent | 1dba445e433aea5bb188e424650c912f620ad341 (diff) | |
download | bcm5719-llvm-d1b7849d49d968a6f5398eb5534a763d42be97b8.tar.gz bcm5719-llvm-d1b7849d49d968a6f5398eb5534a763d42be97b8.zip |
Convert GetElementPtrInst to use ArrayRef.
llvm-svn: 135904
Diffstat (limited to 'llvm/lib/Analysis/ConstantFolding.cpp')
-rw-r--r-- | llvm/lib/Analysis/ConstantFolding.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp index c9f738b6c3c..d74d7e806e6 100644 --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/lib/Analysis/ConstantFolding.cpp @@ -547,8 +547,7 @@ static Constant *CastGEPIndices(ArrayRef<Constant *> Ops, for (unsigned i = 1, e = Ops.size(); i != e; ++i) { if ((i == 1 || !isa<StructType>(GetElementPtrInst::getIndexedType(Ops[0]->getType(), - Ops.data() + 1, - i-1))) && + Ops.slice(1, i-1)))) && Ops[i]->getType() != IntPtrTy) { Any = true; NewIdxs.push_back(ConstantExpr::getCast(CastInst::getCastOpcode(Ops[i], |