aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2021-10-31 19:19:48 +0000
committerGitHub <noreply@github.com>2021-10-31 19:19:48 +0000
commitb1de429d2cf5c2d1643acc73ec3ced22e57d6a07 (patch)
tree99d74a813fc16bbe3389f69cb0ca516744cbb561 /src/check_decl.cpp
parent3de1719c172771c2cb5ed41725274e71906b7e0a (diff)
parent5f51337a01fa4a1e7a461604d564fa64601727cf (diff)
Merge pull request #1255 from odin-lang/wasi-wasm
`wasi_wasm32` support
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp8
1 files changed, 8 insertions, 0 deletions
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) {