mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
Fix a bug that was found by the clang static analyzer. The var "AT" is null so we cant deref it.
llvm-svn: 175550
This commit is contained in:
parent
80c0b783ec
commit
9eca7cc973
@ -846,7 +846,7 @@ Constant *llvm::ConstantFoldInsertValueInstruction(Constant *Agg,
|
|||||||
else if (ArrayType *AT = dyn_cast<ArrayType>(Agg->getType()))
|
else if (ArrayType *AT = dyn_cast<ArrayType>(Agg->getType()))
|
||||||
NumElts = AT->getNumElements();
|
NumElts = AT->getNumElements();
|
||||||
else
|
else
|
||||||
NumElts = AT->getVectorNumElements();
|
NumElts = Agg->getType()->getVectorNumElements();
|
||||||
|
|
||||||
SmallVector<Constant*, 32> Result;
|
SmallVector<Constant*, 32> Result;
|
||||||
for (unsigned i = 0; i != NumElts; ++i) {
|
for (unsigned i = 0; i != NumElts; ++i) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user