Use CursorBase utility functions to reduce repositioning clutter.
This commit is contained in:
@@ -63,8 +63,7 @@ fn legalize_entry_arguments(func: &mut Function, entry: Ebb) {
|
||||
// We want to insert instructions before the first instruction in the entry block.
|
||||
// If the entry block is empty, append instructions to it instead.
|
||||
let mut pos = Cursor::new(&mut func.layout);
|
||||
pos.goto_top(entry);
|
||||
pos.next_inst();
|
||||
pos.goto_first_inst(entry);
|
||||
|
||||
// Keep track of the argument types in the ABI-legalized signature.
|
||||
let abi_types = &func.signature.argument_types;
|
||||
|
||||
Reference in New Issue
Block a user