From 8ef6f9dd7bbb1611dd7166c4e14034e53df4a8b6 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 31 Oct 2021 00:11:38 +0100 Subject: Compile `wasm64`; Add `lb_run_remove_unused_function_pass` --- src/check_decl.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/check_decl.cpp') diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 0591eca4d..c2d23e70c 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -899,6 +899,10 @@ void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) { mutex_unlock(&ctx->info->foreign_mutex); } } + + if (e->Procedure.link_name.len > 0 ) { + e->flags |= EntityFlag_CustomLinkName; + } } void check_global_variable_decl(CheckerContext *ctx, Entity *&e, Ast *type_expr, Ast *init_expr) { @@ -990,6 +994,10 @@ void check_global_variable_decl(CheckerContext *ctx, Entity *&e, Ast *type_expr, string_map_set(fp, key, e); } } + + if (e->Variable.link_name.len > 0) { + e->flags |= EntityFlag_CustomLinkName; + } if (init_expr == nullptr) { if (type_expr == nullptr) { -- cgit v1.2.3