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

Function get_params

crates/rustc_codegen_nvvm/src/llvm.rs:123–131  ·  view source on GitHub ↗

Safe wrapper around `LLVMGetParams`.

(llfn: &Value)

Source from the content-addressed store, hash-verified

121
122/// Safe wrapper around `LLVMGetParams`.
123pub(crate) fn get_params(llfn: &Value) -> Vec<&Value> {
124 unsafe {
125 let count = LLVMCountParams(llfn) as usize;
126 let mut params = Vec::with_capacity(count);
127 LLVMGetParams(llfn, params.as_mut_ptr());
128 params.set_len(count);
129 params
130 }
131}
132
133/// Safe wrapper for `LLVMGetValueName2` into a byte slice
134pub(crate) fn get_value_name(value: &Value) -> &[u8] {

Callers 1

override_libm_functionFunction · 0.85

Calls 1

as_mut_ptrMethod · 0.45

Tested by

no test coverage detected