mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Improve debug output
This commit is contained in:
parent
9faf47e5cd
commit
46c43da1de
2 changed files with 4 additions and 2 deletions
|
@ -107,7 +107,7 @@ macro_rules! assert_llvm_evals_to {
|
||||||
fpm.run_on(&fn_val);
|
fpm.run_on(&fn_val);
|
||||||
} else {
|
} else {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"Function {:?} failed LLVM verification in NON-OPTIMIZED build. Its content was:", fn_val.get_name().to_str().unwrap()
|
"\n\nFunction {:?} failed LLVM verification in NON-OPTIMIZED build. Its content was:\n", fn_val.get_name().to_str().unwrap()
|
||||||
);
|
);
|
||||||
|
|
||||||
fn_val.print_to_stderr();
|
fn_val.print_to_stderr();
|
||||||
|
@ -279,7 +279,7 @@ macro_rules! assert_opt_evals_to {
|
||||||
fpm.run_on(&fn_val);
|
fpm.run_on(&fn_val);
|
||||||
} else {
|
} else {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"Function {:?} failed LLVM verification in OPTIMIZED build. Its content was:", fn_val.get_name().to_str().unwrap()
|
"\n\nFunction {:?} failed LLVM verification in OPTIMIZED build. Its content was:\n", fn_val.get_name().to_str().unwrap()
|
||||||
);
|
);
|
||||||
|
|
||||||
fn_val.print_to_stderr();
|
fn_val.print_to_stderr();
|
||||||
|
|
|
@ -59,6 +59,8 @@ impl<'a> Layout<'a> {
|
||||||
) -> Result<Self, LayoutProblem> {
|
) -> Result<Self, LayoutProblem> {
|
||||||
use roc_types::subs::Content::*;
|
use roc_types::subs::Content::*;
|
||||||
|
|
||||||
|
eprint!("content: ");
|
||||||
|
|
||||||
match content.dbg(subs) {
|
match content.dbg(subs) {
|
||||||
FlexVar(_) | RigidVar(_) => Err(LayoutProblem::UnresolvedTypeVar),
|
FlexVar(_) | RigidVar(_) => Err(LayoutProblem::UnresolvedTypeVar),
|
||||||
Structure(flat_type) => layout_from_flat_type(arena, flat_type, subs, pointer_size),
|
Structure(flat_type) => layout_from_flat_type(arena, flat_type, subs, pointer_size),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue