diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-05-26 21:47:28 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-05-26 21:47:28 +0000 |
commit | 160a3bf74d1a2b048f65e2162d038ed96eddde01 (patch) | |
tree | aa064690b9d5e87ddefe8972545155d9b7e1b772 /utils/TableGen/Record.h | |
parent | 113b3e2c6e30efd7c852d31e98b2d21778e52d1e (diff) | |
download | external_llvm-160a3bf74d1a2b048f65e2162d038ed96eddde01.zip external_llvm-160a3bf74d1a2b048f65e2162d038ed96eddde01.tar.gz external_llvm-160a3bf74d1a2b048f65e2162d038ed96eddde01.tar.bz2 |
Add StringRef::compare_numeric and use it to sort TableGen register records.
This means that our Registers are now ordered R7, R8, R9, R10, R12, ...
Not R1, R10, R11, R12, R2, R3, ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104745 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/Record.h')
-rw-r--r-- | utils/TableGen/Record.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h index 576d626..8f9fd95 100644 --- a/utils/TableGen/Record.h +++ b/utils/TableGen/Record.h @@ -1461,7 +1461,7 @@ public: /// struct LessRecord { bool operator()(const Record *Rec1, const Record *Rec2) const { - return Rec1->getName() < Rec2->getName(); + return StringRef(Rec1->getName()).compare_numeric(Rec2->getName()) < 0; } }; |