mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
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
This commit is contained in:
parent
442c59f0a2
commit
266eff8539
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user