Skip to content

Commit 3058116

Browse files
fix tests
1 parent fbeebc3 commit 3058116

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

regalloc2-tool/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fn main() {
5252
validate_ssa: true,
5353
algorithm: args.algorithm.into(),
5454
};
55-
let output = match regalloc2::run(&function, function.machine_env(), &options) {
55+
let output = match regalloc2::run(&function, &function.machine_env(), &options) {
5656
Ok(output) => output,
5757
Err(e) => {
5858
panic!("Register allocation failed: {e:#?}");
@@ -63,7 +63,8 @@ fn main() {
6363
print_output(&function, &output);
6464
}
6565

66-
let mut checker = Checker::new(&function, function.machine_env());
66+
let machine_env = function.machine_env();
67+
let mut checker = Checker::new(&function, &machine_env);
6768
checker.prepare(&output);
6869
if let Err(e) = checker.run() {
6970
panic!("Regsiter allocation checker failed: {e:#?}");

0 commit comments

Comments
 (0)