mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Make verification ignorable with a define flag
This commit is contained in:
@@ -9,6 +9,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef LLVM_IGNORE_VERIFICATION
|
||||||
|
#define LLVM_IGNORE_VERIFICATION 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "llvm_backend.hpp"
|
#include "llvm_backend.hpp"
|
||||||
#include "llvm_abi.cpp"
|
#include "llvm_abi.cpp"
|
||||||
#include "llvm_backend_opt.cpp"
|
#include "llvm_backend_opt.cpp"
|
||||||
@@ -1126,6 +1131,10 @@ gb_internal void lb_finalize_objc_names(lbProcedure *p) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gb_internal void lb_verify_function(lbModule *m, lbProcedure *p, bool dump_ll=false) {
|
gb_internal void lb_verify_function(lbModule *m, lbProcedure *p, bool dump_ll=false) {
|
||||||
|
if (LLVM_IGNORE_VERIFICATION) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!m->debug_builder && LLVMVerifyFunction(p->value, LLVMReturnStatusAction)) {
|
if (!m->debug_builder && LLVMVerifyFunction(p->value, LLVMReturnStatusAction)) {
|
||||||
char *llvm_error = nullptr;
|
char *llvm_error = nullptr;
|
||||||
|
|
||||||
@@ -2579,6 +2588,10 @@ gb_internal String lb_filepath_obj_for_module(lbModule *m) {
|
|||||||
|
|
||||||
|
|
||||||
gb_internal bool lb_llvm_module_verification(lbGenerator *gen, bool do_threading) {
|
gb_internal bool lb_llvm_module_verification(lbGenerator *gen, bool do_threading) {
|
||||||
|
if (LLVM_IGNORE_VERIFICATION) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (do_threading) {
|
if (do_threading) {
|
||||||
for (auto const &entry : gen->modules) {
|
for (auto const &entry : gen->modules) {
|
||||||
lbModule *m = entry.value;
|
lbModule *m = entry.value;
|
||||||
|
|||||||
Reference in New Issue
Block a user