1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-26 18:02:30 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-10-12 15:32:27 +09:00
parent 706d9d41c9
commit 9f06724c0a
2 changed files with 5 additions and 3 deletions

View File

@ -110,7 +110,7 @@ struct tbb_hash_compare<StringRef> {
class SymbolTable {
public:
void add(StringRef key, Symbol sym);
Symbol *add(StringRef key, Symbol sym);
Symbol *get(StringRef key);
std::vector<StringRef> get_keys();

View File

@ -1,10 +1,12 @@
#include "chibild.h"
void SymbolTable::add(StringRef name, Symbol sym) {
Symbol *SymbolTable::add(StringRef name, Symbol sym) {
MapType::accessor acc;
map.insert(acc, name);
acc->second = sym;
if (acc->second.file == nullptr)
acc->second = sym;
acc.release();
return nullptr;
}
Symbol *SymbolTable::get(StringRef name) {