1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-27 10:23:41 +03:00
mold/symtab.cc
2020-10-20 15:04:18 +09:00

16 lines
300 B
C++

#include "chibild.h"
void SymbolTable::add(StringRef key, StringRef val) {
MapType::accessor acc;
map.insert(acc, key);
acc->second = val;
acc.release();
}
StringRef SymbolTable::get(StringRef key) {
MapType::accessor acc;
if (map.find(acc, key))
return acc->second;
return "";
}