diff options
| author | gingerBill <bill@gingerbill.org> | 2020-05-30 12:23:41 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-05-30 12:23:41 +0100 |
| commit | 84fd40de77deb71544fce7c3c34177ee2f9c4405 (patch) | |
| tree | 0f2c55f474c411343a6668b5c9af9791e8de8963 /src/llvm_backend.cpp | |
| parent | 1d7f99cbdf28236e8d55e7c36ec14c693d139f3f (diff) | |
Fix rules for recursive initialization with procedure entities; Fix executable name if not given
Diffstat (limited to 'src/llvm_backend.cpp')
| -rw-r--r-- | src/llvm_backend.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index f152c7596..4266d5921 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -10645,9 +10645,17 @@ bool lb_init_generator(lbGenerator *gen, Checker *c) { if (build_context.out_filepath.len == 0) { gen->output_name = remove_directory_from_path(init_fullpath); gen->output_name = remove_extension_from_path(gen->output_name); + gen->output_name = string_trim_whitespace(gen->output_name); + if (gen->output_name.len == 0) { + gen->output_name = c->info.init_scope->pkg->name; + } gen->output_base = gen->output_name; } else { gen->output_name = build_context.out_filepath; + gen->output_name = string_trim_whitespace(gen->output_name); + if (gen->output_name.len == 0) { + gen->output_name = c->info.init_scope->pkg->name; + } isize pos = string_extension_position(gen->output_name); if (pos < 0) { gen->output_base = gen->output_name; |