diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-02-01 22:19:26 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-02-01 22:19:26 +0000 |
| commit | fff0dfd810d462a3450e6fa1fffec2ecffeff3d2 (patch) | |
| tree | 63b8b9314f2ee904cfab3b419ea31d1967f9fe3a /llvm/utils | |
| parent | 9f05206659d5017f9fced959d72b018a4ec54f46 (diff) | |
| download | bcm5719-llvm-fff0dfd810d462a3450e6fa1fffec2ecffeff3d2.tar.gz bcm5719-llvm-fff0dfd810d462a3450e6fa1fffec2ecffeff3d2.zip | |
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.
llvm-svn: 149549
Diffstat (limited to 'llvm/utils')
| -rw-r--r-- | llvm/utils/TableGen/CodeGenRegisters.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeGenRegisters.cpp b/llvm/utils/TableGen/CodeGenRegisters.cpp index 7c6661742aa..1d06f3e5287 100644 --- a/llvm/utils/TableGen/CodeGenRegisters.cpp +++ b/llvm/utils/TableGen/CodeGenRegisters.cpp @@ -503,7 +503,7 @@ static int TopoOrderRC(const void *PA, const void *PB) { return 1; // Finally order by name as a tie breaker. - return A->getName() < B->getName(); + return StringRef(A->getName()).compare(B->getName()); } std::string CodeGenRegisterClass::getQualifiedName() const { |

