1
1
mirror of https://github.com/rui314/mold.git synced 2024-10-05 09:07:10 +03:00

temporary

This commit is contained in:
Rui Ueyama 2021-01-22 16:33:05 +09:00
parent 7dbc0c0e76
commit 37741fd47d

5
mold.h
View File

@ -217,13 +217,12 @@ enum {
class Symbol { class Symbol {
public: public:
Symbol() {} Symbol() {}
Symbol(std::string_view name) : name(name) {}
Symbol(const Symbol &other) : name(other.name) {} Symbol(const Symbol &other) : name(other.name) {}
static Symbol *intern(std::string_view name) { static Symbol *intern(std::string_view name) {
static ConcurrentMap<Symbol> map; static ConcurrentMap<Symbol> map;
Symbol sym; return map.insert(name, {name});
sym.name = name;
return map.insert(name, sym);
} }
inline u64 get_addr() const; inline u64 get_addr() const;