From a9bfd952d1747c18a39f1125d2d56b2b61f45378 Mon Sep 17 00:00:00 2001 From: Doug Kwan Date: Sat, 2 Oct 2010 09:35:20 +0000 Subject: [PATCH] 2010-10-02 Doug Kwan * 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. --- gold/ChangeLog | 7 +++++++ gold/symtab.cc | 8 -------- gold/symtab.h | 8 ++++++-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index d03aca42544..03c5fc3127a 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,10 @@ +2010-10-02 Doug Kwan + + * 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. + 2010-10-01 Nick Clifton * expression.cc (eval): Replace dummy argument with NULL. diff --git a/gold/symtab.cc b/gold/symtab.cc index d8cda2d105c..75ed7f633bc 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -501,14 +501,6 @@ Symbol_table::~Symbol_table() { } -// The hash function. The key values are Stringpool keys. - -inline size_t -Symbol_table::Symbol_table_hash::operator()(const Symbol_table_key& key) const -{ - return key.first ^ key.second; -} - // The symbol table key equality function. This is called with // Stringpool keys. diff --git a/gold/symtab.h b/gold/symtab.h index e355b2a75cd..6542edbe5e8 100644 --- a/gold/symtab.h +++ b/gold/symtab.h @@ -1545,10 +1545,14 @@ class Symbol_table typedef std::pair 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 -- 2.30.2