mirror of
https://github.com/rui314/mold.git
synced 2024-12-28 02:44:48 +03:00
temporary
This commit is contained in:
parent
706d9d41c9
commit
9f06724c0a
@ -110,7 +110,7 @@ struct tbb_hash_compare<StringRef> {
|
|||||||
|
|
||||||
class SymbolTable {
|
class SymbolTable {
|
||||||
public:
|
public:
|
||||||
void add(StringRef key, Symbol sym);
|
Symbol *add(StringRef key, Symbol sym);
|
||||||
Symbol *get(StringRef key);
|
Symbol *get(StringRef key);
|
||||||
std::vector<StringRef> get_keys();
|
std::vector<StringRef> get_keys();
|
||||||
|
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
#include "chibild.h"
|
#include "chibild.h"
|
||||||
|
|
||||||
void SymbolTable::add(StringRef name, Symbol sym) {
|
Symbol *SymbolTable::add(StringRef name, Symbol sym) {
|
||||||
MapType::accessor acc;
|
MapType::accessor acc;
|
||||||
map.insert(acc, name);
|
map.insert(acc, name);
|
||||||
|
if (acc->second.file == nullptr)
|
||||||
acc->second = sym;
|
acc->second = sym;
|
||||||
acc.release();
|
acc.release();
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Symbol *SymbolTable::get(StringRef name) {
|
Symbol *SymbolTable::get(StringRef name) {
|
||||||
|
Loading…
Reference in New Issue
Block a user