From: Jay Foad Date: Fri, 22 Jul 2011 07:54:01 +0000 (+0000) Subject: Fix an MSVC warning, caused by a case I missed when converting X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=8908ff207d8dc0daccde3dc5710dc805ec98e1fa;p=oota-llvm.git Fix an MSVC warning, caused by a case I missed when converting ConstantExpr::getGetElementPtr to use ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135758 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp index bdd2edb991c..3c1e000df15 100644 --- a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp +++ b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp @@ -113,7 +113,7 @@ static Instruction *InstCombineLoadCast(InstCombiner &IC, LoadInst &LI, Value *Idxs[2]; Idxs[0] = Constant::getNullValue(Type::getInt32Ty(LI.getContext())); Idxs[1] = Idxs[0]; - CastOp = ConstantExpr::getGetElementPtr(CSrc, Idxs, 2); + CastOp = ConstantExpr::getGetElementPtr(CSrc, Idxs); SrcTy = cast(CastOp->getType()); SrcPTy = SrcTy->getElementType(); }