mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Use std::unordered_map for symbols
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
#include <map>
|
||||
#include <new>
|
||||
#include <stdio.h>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "error.hpp"
|
||||
#include "helpers.hpp"
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "asm/output.hpp"
|
||||
#include "asm/warning.hpp"
|
||||
|
||||
std::map<std::string, Symbol> symbols;
|
||||
std::unordered_map<std::string, Symbol> symbols;
|
||||
|
||||
static std::optional<std::string> labelScope = std::nullopt; // Current section's label scope
|
||||
static Symbol *PCSymbol;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include "link/symbol.hpp"
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <map>
|
||||
#include <stdlib.h>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "error.hpp"
|
||||
#include "helpers.hpp"
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "link/object.hpp"
|
||||
#include "link/section.hpp"
|
||||
|
||||
std::map<std::string, Symbol *> symbols;
|
||||
std::unordered_map<std::string, Symbol *> symbols;
|
||||
|
||||
Label &Symbol::label() {
|
||||
assert(std::holds_alternative<Label>(data));
|
||||
|
||||
Reference in New Issue
Block a user