mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-06 01:27:08 +00:00
Fix a bug that was found by the clang static analyzer. The var "AT" is null so we cant deref it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175550 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a8eae3e358
commit
a175396816
@ -846,8 +846,8 @@ Constant *llvm::ConstantFoldInsertValueInstruction(Constant *Agg,
|
||||
else if (ArrayType *AT = dyn_cast<ArrayType>(Agg->getType()))
|
||||
NumElts = AT->getNumElements();
|
||||
else
|
||||
NumElts = AT->getVectorNumElements();
|
||||
|
||||
NumElts = Agg->getType()->getVectorNumElements();
|
||||
|
||||
SmallVector<Constant*, 32> Result;
|
||||
for (unsigned i = 0; i != NumElts; ++i) {
|
||||
Constant *C = Agg->getAggregateElement(i);
|
||||
|
Loading…
x
Reference in New Issue
Block a user