aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-07-22 07:54:01 +0000
committerJay Foad <jay.foad@gmail.com>2011-07-22 07:54:01 +0000
commit8908ff207d8dc0daccde3dc5710dc805ec98e1fa (patch)
treeb55375f03456030d69c041666d8979380fb68daf /lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
parent4039313b4c9796d194d90f88675ceb47a183696e (diff)
downloadexternal_llvm-8908ff207d8dc0daccde3dc5710dc805ec98e1fa.zip
external_llvm-8908ff207d8dc0daccde3dc5710dc805ec98e1fa.tar.gz
external_llvm-8908ff207d8dc0daccde3dc5710dc805ec98e1fa.tar.bz2
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
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
index bdd2edb..3c1e000 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<PointerType>(CastOp->getType());
SrcPTy = SrcTy->getElementType();
}