Print constants in a comment in CLIF output (#4725)
When trying to read generated CLIF, it's nice to be able to see at a glance that some of the operands are defined by `iconst` and similar instructions, without having to go find each operand's definition manually.
This commit is contained in:
@@ -1073,9 +1073,13 @@ mod tests {
|
||||
"reduction wasn't maximal for insts"
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
format!("{}", reduced_func),
|
||||
expected_str.replace("\r\n", "\n")
|
||||
let actual_ir = format!("{}", reduced_func);
|
||||
let expected_ir = expected_str.replace("\r\n", "\n");
|
||||
assert!(
|
||||
expected_ir == actual_ir,
|
||||
"Expected:\n{}\nGot:\n{}",
|
||||
expected_ir,
|
||||
actual_ir,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user