mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-18 18:42:46 +02:00
Use iterators rather than indices to make this forwards-compatible with a change to the underlying container (to std::list)
llvm-svn: 224734
This commit is contained in:
parent
856eebedff
commit
fc0fed2e9a
@ -2606,10 +2606,11 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
|
||||
// Check for ambiguous matchables.
|
||||
DEBUG_WITH_TYPE("ambiguous_instrs", {
|
||||
unsigned NumAmbiguous = 0;
|
||||
for (unsigned i = 0, e = Info.Matchables.size(); i != e; ++i) {
|
||||
for (unsigned j = i + 1; j != e; ++j) {
|
||||
const MatchableInfo &A = *Info.Matchables[i];
|
||||
const MatchableInfo &B = *Info.Matchables[j];
|
||||
for (auto I = Info.Matchables.begin(), E = Info.Matchables.end(); I != E;
|
||||
++I) {
|
||||
for (auto J = std::next(I); J != E; ++J) {
|
||||
const MatchableInfo &A = **I;
|
||||
const MatchableInfo &B = **J;
|
||||
|
||||
if (A.couldMatchAmbiguouslyWith(B)) {
|
||||
errs() << "warning: ambiguous matchables:\n";
|
||||
|
Loading…
Reference in New Issue
Block a user