diff options
Diffstat (limited to 'src/common/mac/dwarf')
-rw-r--r-- | src/common/mac/dwarf/dwarf2reader.cc | 12 | ||||
-rw-r--r-- | src/common/mac/dwarf/dwarf2reader.h | 5 | ||||
-rw-r--r-- | src/common/mac/dwarf/functioninfo.cc | 21 |
3 files changed, 2 insertions, 36 deletions
diff --git a/src/common/mac/dwarf/dwarf2reader.cc b/src/common/mac/dwarf/dwarf2reader.cc index 6e7a2f1d..dd21561d 100644 --- a/src/common/mac/dwarf/dwarf2reader.cc +++ b/src/common/mac/dwarf/dwarf2reader.cc @@ -26,7 +26,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include <ext/hash_map> #include <stack> #include <utility> @@ -35,17 +34,6 @@ #include "common/mac/dwarf/bytereader.h" #include "common/mac/dwarf/line_state_machine.h" -namespace __gnu_cxx -{ - template<> struct hash< std::string > - { - size_t operator()( const std::string& x ) const - { - return hash< const char* >()( x.c_str() ); - } - }; -} - namespace dwarf2reader { // Read a DWARF2/3 initial length field from START, using READER, and diff --git a/src/common/mac/dwarf/dwarf2reader.h b/src/common/mac/dwarf/dwarf2reader.h index f27cdac7..cb47d97f 100644 --- a/src/common/mac/dwarf/dwarf2reader.h +++ b/src/common/mac/dwarf/dwarf2reader.h @@ -36,8 +36,8 @@ #ifndef COMMON_MAC_DWARF_DWARF2READER_H__ #define COMMON_MAC_DWARF_DWARF2READER_H__ -#include <ext/hash_map> #include <list> +#include <map> #include <string> #include <utility> #include <vector> @@ -46,7 +46,6 @@ #include "common/mac/dwarf/types.h" using namespace std; -using namespace __gnu_cxx; namespace dwarf2reader { struct LineStateMachine; @@ -56,7 +55,7 @@ class LineInfoHandler; // This maps from a string naming a section to a pair containing a // the data for the section, and the size of the section. -typedef hash_map<string, pair<const char*, uint64> > SectionMap; +typedef map<string, pair<const char*, uint64> > SectionMap; typedef list<pair<enum DwarfAttribute, enum DwarfForm> > AttributeList; typedef AttributeList::iterator AttributeIterator; typedef AttributeList::const_iterator ConstAttributeIterator; diff --git a/src/common/mac/dwarf/functioninfo.cc b/src/common/mac/dwarf/functioninfo.cc index 267d6cf9..3501c035 100644 --- a/src/common/mac/dwarf/functioninfo.cc +++ b/src/common/mac/dwarf/functioninfo.cc @@ -39,27 +39,6 @@ #include "common/mac/dwarf/bytereader.h" -namespace __gnu_cxx { - -// Implement a string hash function so that std::string can be used as a key -// in STL maps and sets. The hash algorithm comes from the GNU C++ library, -// in <tr1/functional>. It is duplicated here because GCC versions prior to -// 4.3.2 are unable to compile <tr1/functional> when RTTI is disabled, as it -// may be in this code. - -template<> -struct hash<std::string> { - std::size_t operator()(const std::string& s) const { - std::size_t result = 0; - for (std::string::const_iterator i = s.begin(); i != s.end(); ++i) - result = (result * 131) + *i; - return result; - } -}; - -} // namespace __gnu_cxx - - namespace dwarf2reader { // Given an offset value, its form, and the base offset of the |