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 /include/llvm | |
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 'include/llvm')
-rw-r--r-- | include/llvm/ADT/StringRef.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/ADT/StringRef.h b/include/llvm/ADT/StringRef.h index ab6358b..33756f6 100644 --- a/include/llvm/ADT/StringRef.h +++ b/include/llvm/ADT/StringRef.h @@ -128,6 +128,10 @@ namespace llvm { /// compare_lower - Compare two strings, ignoring case. int compare_lower(StringRef RHS) const; + /// compare_numeric - Compare two strings, treating sequences of digits as + /// numbers. + int compare_numeric(StringRef RHS) const; + /// \brief Determine the edit distance between this string and another /// string. /// |