[llvm] [Transforms] Use range-based for loops (NFC) (PR #145252)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 25 08:09:34 PDT 2025
================
@@ -250,10 +250,10 @@ CleanupPointerRootUsers(GlobalVariable *GV,
}
}
- for (int i = 0, e = Dead.size(); i != e; ++i) {
- if (IsSafeComputationToRemove(Dead[i].first, GetTLI)) {
- Dead[i].second->eraseFromParent();
- Instruction *I = Dead[i].first;
+ for (const auto &Pair : Dead) {
----------------
kazutakahirata wrote:
I've renamed `I` to `Inst` because we already have `I` below. Thanks!
https://github.com/llvm/llvm-project/pull/145252
More information about the llvm-commits
mailing list