mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-15 14:53:43 +00:00
Add -internal-cached
This commit is contained in:
@@ -126,16 +126,17 @@ gb_internal bool lb_init_generator(lbGenerator *gen, Checker *c) {
|
||||
m->gen = gen;
|
||||
map_set(&gen->modules, cast(void *)pkg, m);
|
||||
lb_init_module(m, c);
|
||||
if (module_per_file) {
|
||||
// NOTE(bill): Probably per file is not a good idea, so leave this for later
|
||||
for (AstFile *file : pkg->files) {
|
||||
auto m = gb_alloc_item(permanent_allocator(), lbModule);
|
||||
m->file = file;
|
||||
m->pkg = pkg;
|
||||
m->gen = gen;
|
||||
map_set(&gen->modules, cast(void *)file, m);
|
||||
lb_init_module(m, c);
|
||||
}
|
||||
if (!module_per_file) {
|
||||
continue;
|
||||
}
|
||||
// NOTE(bill): Probably per file is not a good idea, so leave this for later
|
||||
for (AstFile *file : pkg->files) {
|
||||
auto m = gb_alloc_item(permanent_allocator(), lbModule);
|
||||
m->file = file;
|
||||
m->pkg = pkg;
|
||||
m->gen = gen;
|
||||
map_set(&gen->modules, cast(void *)file, m);
|
||||
lb_init_module(m, c);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -144,7 +145,6 @@ gb_internal bool lb_init_generator(lbGenerator *gen, Checker *c) {
|
||||
map_set(&gen->modules, cast(void *)1, &gen->default_module);
|
||||
lb_init_module(&gen->default_module, c);
|
||||
|
||||
|
||||
for (auto const &entry : gen->modules) {
|
||||
lbModule *m = entry.value;
|
||||
LLVMContextRef ctx = LLVMGetModuleContext(m->mod);
|
||||
|
||||
Reference in New Issue
Block a user