MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / at_last_inst

Method at_last_inst

cranelift/codegen/src/cursor.rs:151–157  ·  view source on GitHub ↗

Rebuild this cursor positioned at the last instruction in `block`. This is intended to be used as a builder method: ``` # use cranelift_codegen::ir::{Function, Block, Inst}; # use cranelift_codegen::cursor::{Cursor, FuncCursor}; fn edit_func(func: &mut Function, block: Block) { let mut pos = FuncCursor::new(func).at_last_inst(block); // Use `pos`... } ```

(mut self, block: ir::Block)

Source from the content-addressed store, hash-verified

149 /// }
150 /// ```
151 fn at_last_inst(mut self, block: ir::Block) -> Self
152 where
153 Self: Sized,
154 {
155 self.goto_last_inst(block);
156 self
157 }
158
159 /// Rebuild this cursor positioned after `inst`.
160 ///

Callers

nothing calls this directly

Implementers 2

cursor.rscranelift/codegen/src/cursor.rs
layout.rscranelift/codegen/src/ir/layout.rs

Calls 1

goto_last_instMethod · 0.80

Tested by

no test coverage detected