diff options
author | Doug Kwan <dougkwan@google.com> | 2010-10-02 09:35:20 +0000 |
---|---|---|
committer | Doug Kwan <dougkwan@google.com> | 2010-10-02 09:35:20 +0000 |
commit | a9bfd952d1747c18a39f1125d2d56b2b61f45378 (patch) | |
tree | 376d63ce1e59b6291bed1cf46b6249dff42d49df /gold/symtab.h | |
parent | 9ce00134f4a11875b88cbda116e1be16d8aa06e2 (diff) | |
download | gdb-a9bfd952d1747c18a39f1125d2d56b2b61f45378.zip gdb-a9bfd952d1747c18a39f1125d2d56b2b61f45378.tar.gz gdb-a9bfd952d1747c18a39f1125d2d56b2b61f45378.tar.bz2 |
2010-10-02 Doug Kwan <dougkwan@google.com>
* symtab.cc (Symbol_table::Symbol_table_hash::operator()): Move
defintion to symtab.h
* symtab.h (Symbol_table::Symbol_table_hash::operator()): Change
declaration to defintion.
Diffstat (limited to 'gold/symtab.h')
-rw-r--r-- | gold/symtab.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gold/symtab.h b/gold/symtab.h index e355b2a..6542edb 100644 --- a/gold/symtab.h +++ b/gold/symtab.h @@ -1545,10 +1545,14 @@ class Symbol_table typedef std::pair<Stringpool::Key, Stringpool::Key> Symbol_table_key; + // The hash function. The key values are Stringpool keys. struct Symbol_table_hash { - size_t - operator()(const Symbol_table_key&) const; + inline size_t + operator()(const Symbol_table_key& key) const + { + return key.first ^ key.second; + } }; struct Symbol_table_eq |