MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / codegen_static_initializer

Function codegen_static_initializer

crates/rustc_codegen_nvvm/src/consts.rs:186–192  ·  view source on GitHub ↗
(
    cx: &CodegenCx<'ll, 'tcx>,
    def_id: DefId,
)

Source from the content-addressed store, hash-verified

184}
185
186pub(crate) fn codegen_static_initializer<'ll, 'tcx>(
187 cx: &CodegenCx<'ll, 'tcx>,
188 def_id: DefId,
189) -> Result<(&'ll Value, &'tcx Allocation), ErrorHandled> {
190 let alloc = cx.tcx.eval_static_initializer(def_id)?;
191 Ok((const_alloc_to_llvm(cx, alloc), alloc))
192}
193
194pub(crate) fn linkage_to_llvm(linkage: Linkage) -> llvm::Linkage {
195 match linkage {

Callers 1

codegen_staticMethod · 0.85

Calls 1

const_alloc_to_llvmFunction · 0.85

Tested by

no test coverage detected