diff options
| author | gingerBill <bill@gingerbill.org> | 2023-01-12 21:49:53 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-01-12 21:49:53 +0000 |
| commit | 1e211255270eb43aaf3646d7e62da63b0b855e17 (patch) | |
| tree | c657c8424a5185c61789db78625fd8b82609e8f6 /src/llvm_backend_general.cpp | |
| parent | 4a8c37dd529e9f09583101f086833cec2c1b71ce (diff) | |
Split out object generation more
Diffstat (limited to 'src/llvm_backend_general.cpp')
| -rw-r--r-- | src/llvm_backend_general.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/llvm_backend_general.cpp b/src/llvm_backend_general.cpp index 7eb024daf..15cb3f2be 100644 --- a/src/llvm_backend_general.cpp +++ b/src/llvm_backend_general.cpp @@ -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_ASSERT(e != nullptr); - if (e->pkg) { - lbModule **found = nullptr; + lbModule **found = nullptr; + if (e->file) { found = map_get(&gen->modules, cast(void *)e->file); if (found) { return *found; } + } + if (e->pkg) { found = map_get(&gen->modules, cast(void *)e->pkg); if (found) { return *found; |