diff options
| author | gingerBill <bill@gingerbill.org> | 2018-10-20 10:44:02 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-10-20 10:44:02 +0100 |
| commit | 3742d9e7e9fbb02058c7da9030a0abb023e7b244 (patch) | |
| tree | 9f4af507d413edc9705ac16579f6715673e0ecfb /src/entity.cpp | |
| parent | 4ac1218bf895a9f933f476bd3c36fe24dc7b9a88 (diff) | |
Move atomic intrinsics to the new built-in package intrinsics
Diffstat (limited to 'src/entity.cpp')
| -rw-r--r-- | src/entity.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/entity.cpp b/src/entity.cpp index 15a70f0a5..22c7a24f4 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -153,9 +153,10 @@ struct Entity { }; }; -bool is_entity_kind_exported(EntityKind kind) { +bool is_entity_kind_exported(EntityKind kind, bool allow_builtin = false) { switch (kind) { case Entity_Builtin: + return allow_builtin; case Entity_ImportName: case Entity_LibraryName: case Entity_Nil: @@ -164,10 +165,10 @@ bool is_entity_kind_exported(EntityKind kind) { return true; } -bool is_entity_exported(Entity *e) { +bool is_entity_exported(Entity *e, bool allow_builtin = false) { // TODO(bill): Determine the actual exportation rules for imports of entities GB_ASSERT(e != nullptr); - if (!is_entity_kind_exported(e->kind)) { + if (!is_entity_kind_exported(e->kind, allow_builtin)) { return false; } |