From: Rui Ueyama Date: Tue, 27 Oct 2015 16:57:50 +0000 (+0000) Subject: Rename qsort -> multikey_qsort. NFC. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b6310363b8632e28be55dc2d1f2f1258d5b25c16;p=oota-llvm.git Rename qsort -> multikey_qsort. NFC. `qsort` as a file-scope local function name was confusing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251414 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/MC/StringTableBuilder.cpp b/lib/MC/StringTableBuilder.cpp index a7b3c2c23c1..80e552287b3 100644 --- a/lib/MC/StringTableBuilder.cpp +++ b/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: