[llvm-commits] [llvm] r165203 - /llvm/trunk/lib/MC/SubtargetFeature.cpp

Craig Topper craig.topper at gmail.com
Wed Oct 3 22:18:31 PDT 2012


Author: ctopper
Date: Thu Oct  4 00:18:31 2012
New Revision: 165203

URL: http://llvm.org/viewvc/llvm-project?rev=165203&view=rev
Log:
Remove template from function that is only used with one type after r165092.

Modified:
    llvm/trunk/lib/MC/SubtargetFeature.cpp

Modified: llvm/trunk/lib/MC/SubtargetFeature.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/SubtargetFeature.cpp?rev=165203&r1=165202&r2=165203&view=diff
==============================================================================
--- llvm/trunk/lib/MC/SubtargetFeature.cpp (original)
+++ llvm/trunk/lib/MC/SubtargetFeature.cpp Thu Oct  4 00:18:31 2012
@@ -119,14 +119,15 @@
 }
 
 /// Find KV in array using binary search.
-template<typename T> const T *Find(const StringRef S, const T *A, size_t L) {
+const SubtargetFeatureKV *Find(const StringRef S, const SubtargetFeatureKV *A,
+                               size_t L) {
   // Make the lower bound element we're looking for
-  T KV;
+  SubtargetFeatureKV KV;
   KV.Key = S.data();
   // Determine the end of the array
-  const T *Hi = A + L;
+  const SubtargetFeatureKV *Hi = A + L;
   // Binary search the array
-  const T *F = std::lower_bound(A, Hi, KV);
+  const SubtargetFeatureKV *F = std::lower_bound(A, Hi, KV);
   // If not found then return NULL
   if (F == Hi || StringRef(F->Key) != S) return NULL;
   // Return the found array item





More information about the llvm-commits mailing list