[llvm] Use make_early_inc_range (NFC)
This commit is contained in:
@@ -5538,21 +5538,16 @@ Error BitcodeReader::materialize(GlobalValue *GV) {
|
||||
|
||||
// Upgrade any old intrinsic calls in the function.
|
||||
for (auto &I : UpgradedIntrinsics) {
|
||||
for (auto UI = I.first->materialized_user_begin(), UE = I.first->user_end();
|
||||
UI != UE;) {
|
||||
User *U = *UI;
|
||||
++UI;
|
||||
for (User *U : llvm::make_early_inc_range(I.first->materialized_users()))
|
||||
if (CallInst *CI = dyn_cast<CallInst>(U))
|
||||
UpgradeIntrinsicCall(CI, I.second);
|
||||
}
|
||||
}
|
||||
|
||||
// Update calls to the remangled intrinsics
|
||||
for (auto &I : RemangledIntrinsics)
|
||||
for (auto UI = I.first->materialized_user_begin(), UE = I.first->user_end();
|
||||
UI != UE;)
|
||||
for (User *U : llvm::make_early_inc_range(I.first->materialized_users()))
|
||||
// Don't expect any other users than call sites
|
||||
cast<CallBase>(*UI++)->setCalledFunction(I.second);
|
||||
cast<CallBase>(U)->setCalledFunction(I.second);
|
||||
|
||||
// Finish fn->subprogram upgrade for materialized functions.
|
||||
if (DISubprogram *SP = MDLoader->lookupSubprogramForFunction(F))
|
||||
|
||||
Reference in New Issue
Block a user