Compile wasm64; Add lb_run_remove_unused_function_pass

This commit is contained in:
gingerBill
2021-10-31 00:11:38 +01:00
parent 5bc8a491a7
commit 8ef6f9dd7b
10 changed files with 128 additions and 37 deletions

View File

@@ -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) {