aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-03-03 23:47:14 +0000
committerIan Lance Taylor <iant@google.com>2008-03-03 23:47:14 +0000
commit021777a2ecaf892f2d6160670b1c0d1e0dca4d0f (patch)
tree86942d10aef1bc5e3e7ff679658fcc237576d086 /gold
parent686a5eed5d3a21b899253d03e20a7953a62f4498 (diff)
downloadgdb-021777a2ecaf892f2d6160670b1c0d1e0dca4d0f.zip
gdb-021777a2ecaf892f2d6160670b1c0d1e0dca4d0f.tar.gz
gdb-021777a2ecaf892f2d6160670b1c0d1e0dca4d0f.tar.bz2
Remove partial implementation that was never completed. This was
replaced by the Stringpool<> class.
Diffstat (limited to 'gold')
-rw-r--r--gold/strtab.h73
1 files changed, 0 insertions, 73 deletions
diff --git a/gold/strtab.h b/gold/strtab.h
deleted file mode 100644
index ab22b8f..0000000
--- 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 <cstring>
-#include <string>
-
-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<const char*, Strtab_ref*, strtab_hash, strtab_eq,
- std::allocator<std::pair<const char* const, Strtab_ref*> >,
- 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)