[IRBuilder] "Zero"-initialize SmallVector (NFC)

This commit is contained in:
Kazu Hirata 2021-01-17 10:39:47 -08:00
parent 352fcfc697
commit a59126115e
1 changed files with 1 additions and 3 deletions

View File

@ -1047,9 +1047,7 @@ Value *IRBuilderBase::CreatePreserveArrayAccessIndex(
Value *LastIndexV = getInt32(LastIndex);
Constant *Zero = ConstantInt::get(Type::getInt32Ty(Context), 0);
SmallVector<Value *, 4> IdxList;
for (unsigned I = 0; I < Dimension; ++I)
IdxList.push_back(Zero);
SmallVector<Value *, 4> IdxList(Dimension, Zero);
IdxList.push_back(LastIndexV);
Type *ResultType =