llvm-mc/AsmParser: Fix thinko in ClassInfo::operator<.

llvm-svn: 78533
This commit is contained in:
Daniel Dunbar 2009-08-09 08:23:23 +00:00
parent e0891c2109
commit d9631912cf
1 changed files with 7 additions and 2 deletions

View File

@ -396,10 +396,15 @@ struct InstructionInfo {
if (Operands.size() != RHS.Operands.size())
return Operands.size() < RHS.Operands.size();
for (unsigned i = 0, e = Operands.size(); i != e; ++i)
// Compare lexicographically by operand. The matcher validates that other
// orderings wouldn't be ambiguous using \see CouldMatchAmiguouslyWith().
for (unsigned i = 0, e = Operands.size(); i != e; ++i) {
if (*Operands[i].Class < *RHS.Operands[i].Class)
return true;
if (*RHS.Operands[i].Class < *Operands[i].Class)
return false;
}
return false;
}