1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00
Beef/IDEHelper/Linker/BlSymTable.h

37 lines
640 B
C
Raw Normal View History

2019-08-23 11:56:54 -07:00
#pragma once
#include "../Beef/BfCommon.h"
#include <unordered_map>
#include "BeefySysLib/util/Hash.h"
//#define BL_USE_DENSEMAP_SYMTAB
#ifdef BL_USE_DENSEMAP_SYMTAB
#include <sparsehash/dense_hash_map>
#include <sparsehash/dense_hash_set>
#endif
NS_BF_BEGIN
class BlContext;
class BlSymbol;
class BlSymTable
{
public:
BlContext* mContext;
#ifdef BL_USE_DENSEMAP_SYMTAB
google::dense_hash_map<Val128, BlSymbol*, Val128::Hash, Val128::Equals> mMap;
#else
std::unordered_map<Val128, BlSymbol*, Val128::Hash, Val128::Equals> mMap;
#endif
public:
BlSymTable();
BlSymbol* Add(const char* name, bool* isNew = NULL);
};
NS_BF_END