aboutsummaryrefslogtreecommitdiff
path: root/src/ssa.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2017-10-15 16:16:16 +0100
committergingerBill <bill@gingerbill.org>2017-10-15 16:16:16 +0100
commit56f7a859dfdb990aa480a4fac8c0f48b15e6b90c (patch)
tree4570ecc1a99e1579ed4a81f93b649272b52c6883 /src/ssa.cpp
parente5e14b99476c72c1aa1cc8cb36fa05f5aa830de4 (diff)
Refactor code to remove entity flag for export
Diffstat (limited to 'src/ssa.cpp')
-rw-r--r--src/ssa.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ssa.cpp b/src/ssa.cpp
index 2400d9eca..fa83cecb8 100644
--- a/src/ssa.cpp
+++ b/src/ssa.cpp
@@ -2431,7 +2431,7 @@ bool ssa_generate(Parser *parser, CheckerInfo *info) {
if (e->scope->is_init && name == "main") {
entry_point = e;
}
- if ((e->flags & EntityFlag_ForeignExport) != 0 ||
+ if (e->Procedure.is_export ||
(e->Procedure.link_name.len > 0) ||
(e->scope->is_file && e->Procedure.link_name.len > 0)) {
if (!has_dll_main && name == "DllMain") {
@@ -2464,7 +2464,8 @@ bool ssa_generate(Parser *parser, CheckerInfo *info) {
}
if (!scope->is_global) {
- if (e->kind == Entity_Procedure && (e->flags & EntityFlag_ForeignExport) != 0) {
+ if (e->kind == Entity_Procedure && e->Procedure.is_export) {
+ } else if (e->kind == Entity_Variable && e->Variable.is_export) {
} else if (e->kind == Entity_Procedure && e->Procedure.link_name.len > 0) {
// Handle later
} else if (scope->is_init && e->kind == Entity_Procedure && name == "main") {