[BPF] Initialize SmallVector (NFC) (#143392)

This commit is contained in:
Kazu Hirata 2025-06-09 12:45:59 -07:00 committed by GitHub
parent 60cd76bc34
commit 17999f01bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -414,9 +414,7 @@ static void replaceWithGEP(CallInst *Call, uint32_t DimensionIndex,
Constant *Zero =
ConstantInt::get(Type::getInt32Ty(Call->getParent()->getContext()), 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(Call->getArgOperand(GEPIndex));
auto *GEP = GetElementPtrInst::CreateInBounds(getBaseElementType(Call),