[llvm] [SimplifyCFG] Use range-based for loops (NFC) (PR #107180)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 3 23:59:54 PDT 2024
================
@@ -1000,20 +1000,20 @@ bool SimplifyCFGOpt::simplifyEqualityComparisonWithOnlyPredecessor(
// which value (or set of values) this is.
ConstantInt *TIV = nullptr;
BasicBlock *TIBB = TI->getParent();
- for (unsigned i = 0, e = PredCases.size(); i != e; ++i)
- if (PredCases[i].Dest == TIBB) {
+ for (const auto &[Value, Dest] : PredCases)
----------------
nikic wrote:
TIL this works on plain structs...
https://github.com/llvm/llvm-project/pull/107180
More information about the llvm-commits
mailing list