From d1b7849d49d968a6f5398eb5534a763d42be97b8 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Mon, 25 Jul 2011 09:48:08 +0000 Subject: Convert GetElementPtrInst to use ArrayRef. llvm-svn: 135904 --- llvm/lib/Analysis/ConstantFolding.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/Analysis/ConstantFolding.cpp') 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 Ops, for (unsigned i = 1, e = Ops.size(); i != e; ++i) { if ((i == 1 || !isa(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], -- cgit v1.2.3