diff options
author | Rui Ueyama <ruiu@google.com> | 2015-10-27 16:57:50 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2015-10-27 16:57:50 +0000 |
commit | 5579e0b88ad43d9ac408d8216d9945bdf224c94e (patch) | |
tree | b34dc80cb5946527acf3258ac5b2ff249d79c13b /llvm/lib/MC/StringTableBuilder.cpp | |
parent | baff6b46783969622fe484729dc8501316516519 (diff) | |
download | bcm5719-llvm-5579e0b88ad43d9ac408d8216d9945bdf224c94e.tar.gz bcm5719-llvm-5579e0b88ad43d9ac408d8216d9945bdf224c94e.zip |
Rename qsort -> multikey_qsort. NFC.
`qsort` as a file-scope local function name was confusing.
llvm-svn: 251414
Diffstat (limited to 'llvm/lib/MC/StringTableBuilder.cpp')
-rw-r--r-- | llvm/lib/MC/StringTableBuilder.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/MC/StringTableBuilder.cpp b/llvm/lib/MC/StringTableBuilder.cpp index a7b3c2c23c1..80e552287b3 100644 --- a/llvm/lib/MC/StringTableBuilder.cpp +++ b/llvm/lib/MC/StringTableBuilder.cpp @@ -30,7 +30,7 @@ static int charTailAt(StringPair *P, size_t Pos) { // Three-way radix quicksort. This is much faster than std::sort with strcmp // because it does not compare characters that we already know the same. -static void qsort(StringPair **Begin, StringPair **End, int Pos) { +static void multikey_qsort(StringPair **Begin, StringPair **End, int Pos) { tailcall: if (End - Begin <= 1) return; @@ -50,8 +50,8 @@ tailcall: R++; } - qsort(Begin, P, Pos); - qsort(Q, End, Pos); + multikey_qsort(Begin, P, Pos); + multikey_qsort(Q, End, Pos); if (Pivot != -1) { // qsort(P, Q, Pos + 1), but with tail call optimization. Begin = P; @@ -68,7 +68,7 @@ void StringTableBuilder::finalize() { Strings.push_back(&P); if (!Strings.empty()) - qsort(&Strings[0], &Strings[0] + Strings.size(), 0); + multikey_qsort(&Strings[0], &Strings[0] + Strings.size(), 0); switch (K) { case RAW: |