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

Method symbol_value_data

cranelift/codegen/src/machinst/lower.rs:1398–1420  ·  view source on GitHub ↗

Likewise, but starting with a GlobalValue identifier.

(
        &'b self,
        global_value: GlobalValue,
    )

Source from the content-addressed store, hash-verified

1396
1397 /// Likewise, but starting with a GlobalValue identifier.
1398 pub fn symbol_value_data<'b>(
1399 &'b self,
1400 global_value: GlobalValue,
1401 ) -> Option<(&'b ExternalName, RelocDistance, i64)> {
1402 let gvdata = &self.f.global_values[global_value];
1403 match gvdata {
1404 &GlobalValueData::Symbol {
1405 ref name,
1406 ref offset,
1407 colocated,
1408 ..
1409 } => {
1410 let offset = offset.bits();
1411 let dist = if colocated {
1412 RelocDistance::Near
1413 } else {
1414 RelocDistance::Far
1415 };
1416 Some((name, dist, offset))
1417 }
1418 _ => None,
1419 }
1420 }
1421
1422 /// Returns the memory flags of a given memory access.
1423 pub fn memflags(&self, ir_inst: Inst) -> Option<MachMemFlags> {

Callers

nothing calls this directly

Calls 1

bitsMethod · 0.45

Tested by

no test coverage detected