diff --git a/compiler/gen/tests/test_gen.rs b/compiler/gen/tests/test_gen.rs index 3edc1d0a05..ce39bdbf69 100644 --- a/compiler/gen/tests/test_gen.rs +++ b/compiler/gen/tests/test_gen.rs @@ -288,6 +288,11 @@ mod test_gen { panic!("Function {} failed LLVM verification.", main_fn_name); } + // Verify the module + if let Err(errors) = env.module.verify() { + panic!("Errors defining module: {:?}", errors); + } + // Uncomment this to see the module's optimized LLVM instruction output: // env.module.print_to_stderr(); @@ -424,6 +429,11 @@ mod test_gen { panic!("Function {} failed LLVM verification.", main_fn_name); } + // Verify the module + if let Err(errors) = env.module.verify() { + panic!("Errors defining module: {:?}", errors); + } + // Uncomment this to see the module's optimized LLVM instruction output: // env.module.print_to_stderr();