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

Function set_value_name

crates/rustc_codegen_nvvm/src/llvm.rs:143–148  ·  view source on GitHub ↗

Safe wrapper for `LLVMSetValueName2` from a byte slice

(value: &Value, name: &[u8])

Source from the content-addressed store, hash-verified

141
142/// Safe wrapper for `LLVMSetValueName2` from a byte slice
143pub(crate) fn set_value_name(value: &Value, name: &[u8]) {
144 unsafe {
145 let data = name.as_ptr().cast();
146 LLVMSetValueName2(value, data, name.len());
147 }
148}
149
150pub fn last_error() -> Option<String> {
151 unsafe {

Callers 3

scalar_to_backendMethod · 0.85
codegen_staticMethod · 0.85
set_var_nameMethod · 0.85

Calls 3

as_ptrMethod · 0.80
castMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected