Fix an MSVC warning, caused by a case I missed when converting
authorJay Foad <jay.foad@gmail.com>
Fri, 22 Jul 2011 07:54:01 +0000 (07:54 +0000)
committerJay Foad <jay.foad@gmail.com>
Fri, 22 Jul 2011 07:54:01 +0000 (07:54 +0000)
ConstantExpr::getGetElementPtr to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135758 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp

index bdd2edb991cca964a2d8a58cb5ad53adb23cf475..3c1e000df1549cad9de8ebbfa099ae2528246203 100644 (file)
@@ -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<PointerType>(CastOp->getType());
             SrcPTy = SrcTy->getElementType();
           }