mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-20 19:40:34 +00:00
deferred procedure attribute
This commit is contained in:
@@ -127,6 +127,7 @@ struct Entity {
|
||||
Ast * foreign_library_ident;
|
||||
String link_name;
|
||||
String link_prefix;
|
||||
Entity *deferred_procedure;
|
||||
bool is_foreign;
|
||||
bool is_export;
|
||||
} Procedure;
|
||||
@@ -184,6 +185,14 @@ bool is_entity_exported(Entity *e, bool allow_builtin = false) {
|
||||
return name[0] != '_';
|
||||
}
|
||||
|
||||
bool entity_has_deferred_procedure(Entity *e) {
|
||||
GB_ASSERT(e != nullptr);
|
||||
if (e->kind == Entity_Procedure) {
|
||||
return e->Procedure.deferred_procedure != nullptr;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
gb_global u64 global_entity_id = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user