MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / static_addr_of

Method static_addr_of

crates/rustc_codegen_spirv/src/codegen_cx/declare.rs:324–331  ·  view source on GitHub ↗
(&self, cv: Self::Value, _align: Align, _kind: Option<&str>)

Source from the content-addressed store, hash-verified

322
323impl<'tcx> StaticMethods for CodegenCx<'tcx> {
324 fn static_addr_of(&self, cv: Self::Value, _align: Align, _kind: Option<&str>) -> Self::Value {
325 self.def_constant(
326 self.type_ptr_to(cv.ty),
327 SpirvConst::PtrTo {
328 pointee: cv.def_cx(self),
329 },
330 )
331 }
332
333 fn codegen_static(&self, def_id: DefId, _is_mutable: bool) {
334 let g = self.get_static(def_id);

Callers 2

scalar_to_backendMethod · 0.80
from_const_allocMethod · 0.80

Calls 3

def_constantMethod · 0.80
type_ptr_toMethod · 0.80
def_cxMethod · 0.80

Tested by

no test coverage detected