[Attributor][NFC] Use indexes instead of iterator
authorLuofan Chen <clfbbn@gmail.com>
Sat, 15 Aug 2020 15:04:11 +0000 (23:04 +0800)
committerLuofan Chen <clfbbn@gmail.com>
Sat, 15 Aug 2020 15:09:46 +0000 (23:09 +0800)
commitb7448a348bb863365b3d4652010a29efedd8f2e7
treeeadacf9a395cf50b6a0fb760621949573c10a467
parent345053390ac17dd4a2e759de9e0e24c2605035db
[Attributor][NFC] Use indexes instead of iterator

When adding elements when iterating, the iterator will become
valid, which could cause errors. This fixes the issue by using
indexes instead of iterator.
llvm/lib/Transforms/IPO/Attributor.cpp