From 3742d9e7e9fbb02058c7da9030a0abb023e7b244 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 20 Oct 2018 10:44:02 +0100 Subject: Move atomic intrinsics to the new built-in package intrinsics --- src/entity.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/entity.cpp') 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; } -- cgit v1.2.3