forked from OSchip/llvm-project
llvm-mc/AsmParser: Fix thinko in ClassInfo::operator<.
llvm-svn: 78533
This commit is contained in:
parent
e0891c2109
commit
d9631912cf
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue