[cfe-commits] r90663 - /cfe/trunk/lib/Sema/SemaCodeComplete.cpp

Benjamin Kramer benny.kra at googlemail.com
Sat Dec 5 02:22:17 PST 2009


Author: d0k
Date: Sat Dec  5 04:22:15 2009
New Revision: 90663

URL: http://llvm.org/viewvc/llvm-project?rev=90663&view=rev
Log:
Avoid trashing two temporary strings.

Modified:
    cfe/trunk/lib/Sema/SemaCodeComplete.cpp

Modified: cfe/trunk/lib/Sema/SemaCodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCodeComplete.cpp?rev=90663&r1=90662&r2=90663&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaCodeComplete.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCodeComplete.cpp Sat Dec  5 04:22:15 2009
@@ -1110,8 +1110,8 @@
       // The only stable ordering we have is to turn the name into a
       // string and then compare the lower-case strings. This is
       // inefficient, but thankfully does not happen too often.
-      return llvm::LowercaseString(X.getAsString()) 
-        < llvm::LowercaseString(Y.getAsString());
+      return llvm::StringRef(X.getAsString()).compare_lower(
+                                                 Y.getAsString()) < 0;
     }
     
     bool operator()(const Result &X, const Result &Y) const {





More information about the cfe-commits mailing list