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

Method set_srcloc

cranelift/codegen/src/ir/function.rs:453–456  ·  view source on GitHub ↗

Sets an absolute source location for the given instruction. If no base source location has been set yet, records it at the same time.

(&mut self, inst: Inst, srcloc: SourceLoc)

Source from the content-addressed store, hash-verified

451 ///
452 /// If no base source location has been set yet, records it at the same time.
453 pub fn set_srcloc(&mut self, inst: Inst, srcloc: SourceLoc) {
454 let base = self.params.ensure_base_srcloc(srcloc);
455 self.stencil.srclocs[inst] = RelSourceLoc::from_base_offset(base, srcloc);
456 }
457
458 /// Returns an absolute source location for the given instruction.
459 pub fn srcloc(&self, inst: Inst) -> SourceLoc {

Callers

nothing calls this directly

Calls 1

ensure_base_srclocMethod · 0.80

Tested by

no test coverage detected