Rename CStringComparator to CStringLessThanComparator.
Change-Id: Ie44950ebe5c65cd071238fb504769f71f346c729
diff --git a/src/compiler_llvm/runtime_support_llvm.cc b/src/compiler_llvm/runtime_support_llvm.cc
index 59124ce..dcd4d96 100644
--- a/src/compiler_llvm/runtime_support_llvm.cc
+++ b/src/compiler_llvm/runtime_support_llvm.cc
@@ -27,6 +27,7 @@
#include "shadow_frame.h"
#include "thread.h"
#include "thread_list.h"
+#include "utils_llvm.h"
#include "verifier/method_verifier.h"
#include "well_known_classes.h"
@@ -584,13 +585,6 @@
// Runtime Support Function Lookup Callback
//----------------------------------------------------------------------------
-class CStringComparator {
- public:
- bool operator()(const char* lhs, const char* rhs) const {
- return (strcmp(lhs, rhs) < 0);
- }
-};
-
#define EXTERNAL_LINKAGE(NAME) \
extern "C" void NAME(...);
@@ -623,7 +617,8 @@
const char* const* const names_end = names + num_entries;
const char* const* name_lbound_ptr =
- std::lower_bound(names_begin, names_end, name, CStringComparator());
+ std::lower_bound(names_begin, names_end, name,
+ CStringLessThanComparator());
if (name_lbound_ptr < names_end && strcmp(*name_lbound_ptr, name) == 0) {
return funcs[name_lbound_ptr - names_begin];
diff --git a/src/compiler_llvm/utils_llvm.h b/src/compiler_llvm/utils_llvm.h
index 89a1946..dd35f0a 100644
--- a/src/compiler_llvm/utils_llvm.h
+++ b/src/compiler_llvm/utils_llvm.h
@@ -36,6 +36,13 @@
return StringPrintf("Art%u", static_cast<unsigned int>(elf_func_idx));
}
+class CStringLessThanComparator {
+ public:
+ bool operator()(const char* lhs, const char* rhs) const {
+ return (strcmp(lhs, rhs) < 0);
+ }
+};
+
} // namespace art
#endif // ART_SRC_UTILS_LLVM_H_