aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-03-19 17:02:01 +0000
committergingerBill <bill@gingerbill.org>2024-03-19 17:02:01 +0000
commit83dcce9a58c72f9f4e079aae8e06e932773ec8e2 (patch)
tree92381999f6d0033b1566bf1f549c74e147d847ed /src/llvm_backend.cpp
parentcc62773a05cb6c7a00cfcb916da1b6fdde7de3e8 (diff)
parent433109ff52d2db76069273cd53b7aebf6aea9be0 (diff)
Merge branch 'master' into orca-dev
Diffstat (limited to 'src/llvm_backend.cpp')
-rw-r--r--src/llvm_backend.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp
index ca4341525..cc9b3ac5d 100644
--- a/src/llvm_backend.cpp
+++ b/src/llvm_backend.cpp
@@ -1350,7 +1350,7 @@ gb_internal WORKER_TASK_PROC(lb_llvm_emit_worker_proc) {
if (LLVMTargetMachineEmitToFile(wd->target_machine, wd->m->mod, cast(char *)wd->filepath_obj.text, wd->code_gen_file_type, &llvm_error)) {
gb_printf_err("LLVM Error: %s\n", llvm_error);
- gb_exit(1);
+ exit_with_errors();
}
debugf("Generated File: %.*s\n", LIT(wd->filepath_obj));
return 0;
@@ -1919,7 +1919,7 @@ verify
gb_printf_err("LLVM Error: %s\n", llvm_error);
}
}
- gb_exit(1);
+ exit_with_errors();
return 1;
}
#endif
@@ -2104,11 +2104,11 @@ gb_internal WORKER_TASK_PROC(lb_llvm_module_verification_worker_proc) {
String filepath_ll = lb_filepath_ll_for_module(m);
if (LLVMPrintModuleToFile(m->mod, cast(char const *)filepath_ll.text, &llvm_error)) {
gb_printf_err("LLVM Error: %s\n", llvm_error);
- gb_exit(1);
+ exit_with_errors();
return false;
}
}
- gb_exit(1);
+ exit_with_errors();
return 1;
}
return 0;
@@ -2193,7 +2193,7 @@ gb_internal bool lb_llvm_object_generation(lbGenerator *gen, bool do_threading)
if (LLVMTargetMachineEmitToFile(m->target_machine, m->mod, cast(char *)filepath_obj.text, code_gen_file_type, &llvm_error)) {
gb_printf_err("LLVM Error: %s\n", llvm_error);
- gb_exit(1);
+ exit_with_errors();
return false;
}
debugf("Generated File: %.*s\n", LIT(filepath_obj));
@@ -2393,7 +2393,7 @@ gb_internal void lb_generate_procedure(lbModule *m, lbProcedure *p) {
gb_printf_err("LLVM Error: %s\n", llvm_error);
}
LLVMVerifyFunction(p->value, LLVMPrintMessageAction);
- gb_exit(1);
+ exit_with_errors();
}
}
@@ -2962,7 +2962,7 @@ gb_internal bool lb_generate_code(lbGenerator *gen) {
String filepath_ll = lb_filepath_ll_for_module(m);
if (LLVMPrintModuleToFile(m->mod, cast(char const *)filepath_ll.text, &llvm_error)) {
gb_printf_err("LLVM Error: %s\n", llvm_error);
- gb_exit(1);
+ exit_with_errors();
return false;
}
array_add(&gen->output_temp_paths, filepath_ll);
@@ -3021,7 +3021,7 @@ gb_internal bool lb_generate_code(lbGenerator *gen) {
}
}
- gb_sort_array(gen->foreign_libraries.data, gen->foreign_libraries.count, foreign_library_cmp);
+ array_sort(gen->foreign_libraries, foreign_library_cmp);
return true;
}