mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
Split out object generation more
This commit is contained in:
@@ -329,12 +329,14 @@ gb_internal bool lb_is_instr_terminating(LLVMValueRef instr) {
|
|||||||
|
|
||||||
gb_internal lbModule *lb_module_of_entity(lbGenerator *gen, Entity *e) {
|
gb_internal lbModule *lb_module_of_entity(lbGenerator *gen, Entity *e) {
|
||||||
GB_ASSERT(e != nullptr);
|
GB_ASSERT(e != nullptr);
|
||||||
if (e->pkg) {
|
lbModule **found = nullptr;
|
||||||
lbModule **found = nullptr;
|
if (e->file) {
|
||||||
found = map_get(&gen->modules, cast(void *)e->file);
|
found = map_get(&gen->modules, cast(void *)e->file);
|
||||||
if (found) {
|
if (found) {
|
||||||
return *found;
|
return *found;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (e->pkg) {
|
||||||
found = map_get(&gen->modules, cast(void *)e->pkg);
|
found = map_get(&gen->modules, cast(void *)e->pkg);
|
||||||
if (found) {
|
if (found) {
|
||||||
return *found;
|
return *found;
|
||||||
|
|||||||
Reference in New Issue
Block a user