summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2009-12-05 10:22:15 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2009-12-05 10:22:15 +0000
commit4053e5db548d771dfa7d9ddc9f70e623e638880b (patch)
treeb7224bb75c2fe75ac8d3c948077dc95dbb6abf07 /clang/lib
parented60635d7057b5ef87c4c411879b0ed64dee7d20 (diff)
downloadbcm5719-llvm-4053e5db548d771dfa7d9ddc9f70e623e638880b.tar.gz
bcm5719-llvm-4053e5db548d771dfa7d9ddc9f70e623e638880b.zip
Avoid trashing two temporary strings.
llvm-svn: 90663
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaCodeComplete.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index 18b6be099f4..7d71cd723f9 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -1110,8 +1110,8 @@ namespace {
// 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 {
OpenPOWER on IntegriCloud