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

Method get_param

crates/rustc_codegen_nvvm/src/abi.rs:531–547  ·  view source on GitHub ↗
(&mut self, index: usize)

Source from the content-addressed store, hash-verified

529 }
530
531 fn get_param(&mut self, index: usize) -> Self::Value {
532 let val = llvm::get_param(self.llfn(), index as c_uint);
533 trace!("Get param `{:?}`", val);
534 unsafe {
535 let llfnty = LLVMRustGetFunctionType(self.llfn());
536 // destructure so rustc doesnt complain in the call to transmute_llval
537 let Self { cx, llbuilder } = self;
538 let map = cx.remapped_integer_args.borrow();
539 if let Some((_, key)) = map.get(llfnty) {
540 if let Some((_, new_ty)) = key.iter().find(|t| t.0 == index) {
541 trace!("Casting irregular param {:?} to {:?}", val, new_ty);
542 return transmute_llval(llbuilder, cx, val, *new_ty);
543 }
544 }
545 val
546 }
547 }
548}
549
550pub(crate) trait ArgAbiExt<'ll, 'tcx> {

Callers

nothing calls this directly

Calls 7

get_paramFunction · 0.85
LLVMRustGetFunctionTypeFunction · 0.85
transmute_llvalFunction · 0.85
llfnMethod · 0.80
borrowMethod · 0.80
iterMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected