aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaCodeComplete.cpp
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
commit0e7049fc6f2cc13d1236630782b702f11f6aaf9f (patch)
tree36340e813d7777199eb468a2a5acdf090dd888b2 /lib/Sema/SemaCodeComplete.cpp
parentf42d4886ae4eb37e212d88e78e7c695904f2444e (diff)
Avoid trashing two temporary strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90663 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--lib/Sema/SemaCodeComplete.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index 18b6be099f..7d71cd723f 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/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 {