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

Method ensure_base_srcloc

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

Sets the base `SourceLoc`, if not set yet, and returns the base value.

(&mut self, srcloc: SourceLoc)

Source from the content-addressed store, hash-verified

101
102 /// Sets the base `SourceLoc`, if not set yet, and returns the base value.
103 pub fn ensure_base_srcloc(&mut self, srcloc: SourceLoc) -> SourceLoc {
104 match self.base_srcloc {
105 Some(val) => val,
106 None => {
107 self.base_srcloc = Some(srcloc);
108 srcloc
109 }
110 }
111 }
112
113 /// Retrieve a `UserExternalNameRef` for the given name, or add a new one.
114 ///

Callers 2

set_srclocMethod · 0.80
set_srclocMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected