aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/SubtargetFeature.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2012-10-04 05:18:31 +0000
committerCraig Topper <craig.topper@gmail.com>2012-10-04 05:18:31 +0000
commit266eff8539116261b3cc0775205a34663afecb52 (patch)
tree550bea71ba871305a5f9b923cab9275476a3daed /lib/MC/SubtargetFeature.cpp
parent442c59f0a2fc3e596d0ce1f13b4a6849b2f46cc4 (diff)
downloadexternal_llvm-266eff8539116261b3cc0775205a34663afecb52.zip
external_llvm-266eff8539116261b3cc0775205a34663afecb52.tar.gz
external_llvm-266eff8539116261b3cc0775205a34663afecb52.tar.bz2
Remove template from function that is only used with one type after r165092.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/SubtargetFeature.cpp')
-rw-r--r--lib/MC/SubtargetFeature.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/MC/SubtargetFeature.cpp b/lib/MC/SubtargetFeature.cpp
index 8a52284..378c418 100644
--- a/lib/MC/SubtargetFeature.cpp
+++ b/lib/MC/SubtargetFeature.cpp
@@ -119,14 +119,15 @@ void SubtargetFeatures::AddFeature(const StringRef String,
}
/// 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