From: Ian Lance Taylor Date: Mon, 3 Mar 2008 23:47:14 +0000 (+0000) Subject: Remove partial implementation that was never completed. This was X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=021777a2ecaf892f2d6160670b1c0d1e0dca4d0f;p=binutils-gdb.git Remove partial implementation that was never completed. This was replaced by the Stringpool<> class. --- diff --git a/gold/strtab.h b/gold/strtab.h deleted file mode 100644 index ab22b8fc286..00000000000 --- a/gold/strtab.h +++ /dev/null @@ -1,73 +0,0 @@ -// strtab.h -- manage an ELF string table for gold -*- C++ -*- - -#ifndef GOLD_STRTAB_H -#define GOLD_STRTAB_H - -#include -#include - -namespace gold -{ - -// This class holds an ELF string table. We keep a reference count -// for each string, which we use to determine which strings are -// actually required at the end. When all operations are done, the -// string table is finalized, which sets the offsets to use for each -// string. - -class Strtab -{ - public: - Strtab(); - - ~Strtab(); - - Strtab_ref* add(const char*); - - Strtab_ref* add(const std::string& s) - { return this->add(s.c_str()); } - - private: - Strtab(const Strtab&); - Strtab& operator=(const Strtab&); - - struct strtab_hash - { - std::size_t - operator()(const char*p); - }; - - struct strtab_eq - { - bool - operator()(const char* p1, const char* p2) - { return strcmp(p1, p2) == 0; } - }; - - Unordered_map >, - true> strings_; -}; - -// Users of Strtab work with pointers to Strtab_ref structures. These -// are allocated via new and should be deleted if the string is no -// longer needed. - -class Strtab_ref -{ - public: - ~Strtab_ref(); - - const char* - str() const; - - private: - Strtab_ref(const Strtab_ref&); - Strtab_ref& operator=(const Strtab_ref&); - - int refs_; -}; - -} // End namespace gold. - -#endif // !defined(GOLD_STRTAB_H)