mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-14 18:20:11 -08:00
radlink: track function override alternate name directives with a cursor to prevent unnecessary rescans
This commit is contained in:
1 parent
50a489e816
commit
86ec8137d4
2 files changed
+4
-2
No files matched your search
+3
-2
@@ -1142,6 +1142,7 @@ lnk_link_init(TP_Arena *arena, LNK_Config *config)
|
||||
link->arena = arena_alloc(.name = "LINK");
|
||||
link->last_symbol_input = &link->objs.first;
|
||||
link->last_include = &config->include_symbol_list.first;
|
||||
link->last_func_override_alt_name = &config->alt_name_list.first;
|
||||
link->last_default_lib = &config->input_default_lib_list.first;
|
||||
link->last_obj_lib = &config->input_obj_lib_list.first;
|
||||
link->last_cmd_lib = &config->input_list[LNK_Input_Lib].first;
|
||||
@@ -1310,8 +1311,8 @@ lnk_load_inputs(TP_Context *tp, TP_Arena *arena, LNK_Config *config, LNK_Inputer
|
||||
{
|
||||
B32 has_function_overrides = 0;
|
||||
|
||||
for EachNode(alt_name_n, LNK_AltNameNode, config->alt_name_list.first) {
|
||||
LNK_AltName alt_name = alt_name_n->v;
|
||||
for (; *link->last_func_override_alt_name; link->last_func_override_alt_name = &(*link->last_func_override_alt_name)->next) {
|
||||
LNK_AltName alt_name = (*link->last_func_override_alt_name)->v;
|
||||
if ( ! str8_ends_with(alt_name.from, str8_lit("$fo$"), 0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ typedef struct LNK_Link
|
||||
LNK_LibList libs;
|
||||
LNK_ObjNode **last_symbol_input;
|
||||
LNK_IncludeSymbolNode **last_include;
|
||||
LNK_AltNameNode **last_func_override_alt_name;
|
||||
String8Node **last_cmd_lib;
|
||||
String8Node **last_default_lib;
|
||||
String8Node **last_obj_lib;
|
||||
|
||||
Reference in new issue
Block a user