llvm.org GIT mirror llvm / ee59920
Fix a bug in the TopoOrderRC comparison function. The final tie breaker comparison also needs to return +/-1, or 0. This is not a less() function. This could cause otherwise identical super-classes to be ordered unstably, depending on what the system qsort routine does with a bad compare function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149549 91177308-0d34-0410-b5e6-96231b3b80d8 Jakob Stoklund Olesen 7 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
502502 return 1;
503503
504504 // Finally order by name as a tie breaker.
505 return A->getName() < B->getName();
505 return StringRef(A->getName()).compare(B->getName());
506506 }
507507
508508 std::string CodeGenRegisterClass::getQualifiedName() const {