mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[TableGen] Fix invalid comparison function SizeOrder
in getMatchingSubClassWithSubRegs
Building LLVM with -DEXPENSIVE_CHECKS fails with the following error message with libstdc++ in debug mode: Error: comparison doesn't meet irreflexive requirements, assert(!(a < a)). The patch fixes the comparison function SizeOrder by returning false when comparing two equal items.
This commit is contained in:
parent
7872d20b80
commit
524ed02943
@ -999,6 +999,8 @@ CodeGenRegisterClass::getMatchingSubClassWithSubRegs(
|
||||
const CodeGenRegisterClass *B) {
|
||||
// If there are multiple, identical register classes, prefer the original
|
||||
// register class.
|
||||
if (A == B)
|
||||
return false;
|
||||
if (A->getMembers().size() == B->getMembers().size())
|
||||
return A == this;
|
||||
return A->getMembers().size() > B->getMembers().size();
|
||||
|
Loading…
x
Reference in New Issue
Block a user