diff options
| author | 2012-06-01 16:03:27 +0800 | |
|---|---|---|
| committer | 2012-06-06 21:12:48 -0700 | |
| commit | a1beb1f8d37e5a02af12d80e59012f68112b3113 (patch) | |
| tree | 38eee5d1a143ce32530dda291b194c77e0d62989 /src/compiler_llvm | |
| parent | fc6c5fde1b7cd0b8f06af2626bf7c597232f478d (diff) | |
Rename CStringComparator to CStringLessThanComparator.
Change-Id: Ie44950ebe5c65cd071238fb504769f71f346c729
Diffstat (limited to 'src/compiler_llvm')
| -rw-r--r-- | src/compiler_llvm/runtime_support_llvm.cc | 11 | ||||
| -rw-r--r-- | src/compiler_llvm/utils_llvm.h | 7 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/compiler_llvm/runtime_support_llvm.cc b/src/compiler_llvm/runtime_support_llvm.cc index 59124ce706..dcd4d96807 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 @@ void art_check_put_array_element_from_code(const Object* element, const Object* // 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 @@ static void* art_find_compiler_runtime_func(char const* name) { 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 89a1946cb4..dd35f0a089 100644 --- a/src/compiler_llvm/utils_llvm.h +++ b/src/compiler_llvm/utils_llvm.h @@ -36,6 +36,13 @@ inline static std::string ElfFuncName(uint16_t elf_func_idx) { 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_ |