aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2017-10-15 16:11:34 +0100
committergingerBill <bill@gingerbill.org>2017-10-15 16:11:34 +0100
commite5e14b99476c72c1aa1cc8cb36fa05f5aa830de4 (patch)
treeb4fbaf03b879c4f23299dcb040e026a557ef6566 /src/check_decl.cpp
parent3d8bf36a304f3500840d4e2a990e78d15da70cb1 (diff)
Remove name mangling for `foreign export` variables
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index f43d23c1c..4f3c5ae2d 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -514,7 +514,6 @@ void check_proc_decl(Checker *c, Entity *e, DeclInfo *d) {
init_entity_foreign_library(c, e);
-
auto *fp = &c->info.foreigns;
HashKey key = hash_string(name);
Entity **found = map_get(fp, key);
@@ -606,7 +605,8 @@ void check_var_decl(Checker *c, Entity *e, Entity **entities, isize entity_count
error(e->token, "A foreign variable declaration cannot have a default value");
}
init_entity_foreign_library(c, e);
-
+ }
+ if (e->Variable.is_foreign || (e->flags & EntityFlag_ForeignExport) != 0) {
String name = e->token.string;
auto *fp = &c->info.foreigns;
HashKey key = hash_string(name);