mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
improve error message
This commit is contained in:
parent
8cec4c41f8
commit
03fec5f21c
1 changed files with 6 additions and 2 deletions
|
@ -261,8 +261,12 @@ fn create_llvm_module<'a>(
|
|||
|
||||
// Verify the module
|
||||
if let Err(errors) = env.module.verify() {
|
||||
env.module.print_to_file("/tmp/test.ll").unwrap();
|
||||
panic!("Errors defining module:\n\n{}", errors.to_string());
|
||||
let path = "/tmp/test.ll";
|
||||
env.module.print_to_file(path).unwrap();
|
||||
panic!(
|
||||
"Errors defining module:\n\n{}\n\nI have written the full module to `{path}`",
|
||||
errors.to_string()
|
||||
);
|
||||
}
|
||||
|
||||
// Uncomment this to see the module's optimized LLVM instruction output:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue