mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-15 15:44:04 +00:00
Move atomic intrinsics to the new built-in package intrinsics
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user