1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-27 10:23:41 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-10-12 12:59:40 +09:00
parent c7ca153a93
commit b8f74f521f
5 changed files with 19 additions and 13 deletions

View File

@ -103,18 +103,6 @@ struct tbb_hash_compare<StringRef> {
};
}
class SymbolTable {
public:
void add(StringRef key, Symbol sym);
Symbol *get(StringRef key);
std::vector<StringRef> get_keys();
private:
typedef tbb::concurrent_hash_map<StringRef, Symbol> MapType;
MapType map;
};
class InputSection {
public:
InputSection(ObjectFile *file, ELF64LE::Shdr *hdr, StringRef name);

View File

@ -1,4 +1,5 @@
#include "chibild.h"
#include "symtab.h"
using namespace llvm;
using namespace llvm::ELF;

View File

@ -8,7 +8,6 @@ using llvm::object::Archive;
using llvm::opt::InputArgList;
Config config;
SymbolTable symbol_table;
//
// Command-line option processing

View File

@ -1,4 +1,7 @@
#include "chibild.h"
#include "symtab.h"
SymbolTable symbol_table;
void SymbolTable::add(StringRef name, Symbol sym) {
MapType::accessor acc;

15
symtab.h Normal file
View File

@ -0,0 +1,15 @@
#pragma once
#include "chibild.h"
class SymbolTable {
public:
void add(StringRef key, Symbol sym);
Symbol *get(StringRef key);
std::vector<StringRef> get_keys();
private:
typedef tbb::concurrent_hash_map<StringRef, Symbol> MapType;
MapType map;
};