diff options
author | Cary Coutant <ccoutant@google.com> | 2010-08-03 20:38:09 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2010-08-03 20:38:09 +0000 |
commit | fef830db38dc7b443745fca928d5f05c1f867737 (patch) | |
tree | 8e65b43e56f3b3be5b611f436ca821f71773ceab /gold/stringpool.cc | |
parent | bfea910e97b4375e2027c52936c79cde94221796 (diff) | |
download | gdb-fef830db38dc7b443745fca928d5f05c1f867737.zip gdb-fef830db38dc7b443745fca928d5f05c1f867737.tar.gz gdb-fef830db38dc7b443745fca928d5f05c1f867737.tar.bz2 |
* merge.cc (Output_merge_string::do_add_input_section): Count strings
to reserve space in merged_strings vector. Keep total input size
for stats.
(Output_merge_string::do_print_merge_stats): Print total input size.
* merge.h (Output_merge_string): Add input_size_ field.
* stringpool.cc (Stringpool_template::string_length): Move
implementations out of Stringpool_template class and place in
stringpool.h.
* stringpool.h (string_length): Move out of Stringpool_template.
Diffstat (limited to 'gold/stringpool.cc')
-rw-r--r-- | gold/stringpool.cc | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/gold/stringpool.cc b/gold/stringpool.cc index 10d6d27..4ddba8d 100644 --- a/gold/stringpool.cc +++ b/gold/stringpool.cc @@ -87,28 +87,6 @@ Stringpool_template<Stringpool_char>::reserve(unsigned int n) this->string_set_.swap(new_string_set); } -// Return the length of a string of arbitrary character type. - -template<typename Stringpool_char> -size_t -Stringpool_template<Stringpool_char>::string_length(const Stringpool_char* p) -{ - size_t len = 0; - for (; *p != 0; ++p) - ++len; - return len; -} - -// Specialize string_length for char. Maybe we could just use -// std::char_traits<>::length? - -template<> -inline size_t -Stringpool_template<char>::string_length(const char* p) -{ - return strlen(p); -} - // Compare two strings of arbitrary character type for equality. template<typename Stringpool_char> |