llvm.org GIT mirror llvm / 1b15304
Use iterators rather than indices to make this forwards-compatible with a change to the underlying container (to std::list) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224734 91177308-0d34-0410-b5e6-96231b3b80d8 David Blaikie 4 years ago
1 changed file(s) with 5 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
26052605 // Check for ambiguous matchables.
26062606 DEBUG_WITH_TYPE("ambiguous_instrs", {
26072607 unsigned NumAmbiguous = 0;
2608 for (unsigned i = 0, e = Info.Matchables.size(); i != e; ++i) {
2609 for (unsigned j = i + 1; j != e; ++j) {
2610 const MatchableInfo &A = *Info.Matchables[i];
2611 const MatchableInfo &B = *Info.Matchables[j];
2608 for (auto I = Info.Matchables.begin(), E = Info.Matchables.end(); I != E;
2609 ++I) {
2610 for (auto J = std::next(I); J != E; ++J) {
2611 const MatchableInfo &A = **I;
2612 const MatchableInfo &B = **J;
26122613
26132614 if (A.couldMatchAmbiguouslyWith(B)) {
26142615 errs() << "warning: ambiguous matchables:\n";