Eliminate one extra conversion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134240 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2011-07-01 16:59:30 +00:00
parent ed5bc470aa
commit 4d9af61a48

View File

@ -128,7 +128,7 @@ template<typename T> const T *Find(const StringRef S, const T *A, size_t L) {
// Binary search the array
const T *F = std::lower_bound(A, Hi, KV);
// If not found then return NULL
if (F == Hi || std::string(F->Key) != S) return NULL;
if (F == Hi || StringRef(F->Key) != S) return NULL;
// Return the found array item
return F;
}