Eliminate one extra conversion.
authorEvan Cheng <evan.cheng@apple.com>
Fri, 1 Jul 2011 16:59:30 +0000 (16:59 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 1 Jul 2011 16:59:30 +0000 (16:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134240 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/SubtargetFeature.cpp

index d72c346eea60a1fc46bd70f1aceed91a771e170a..b9caece47499c8ded05199a9c30f02c9614c7ead 100644 (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;
 }