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

Method get_defined_value

crates/rustc_codegen_nvvm/src/context.rs:370–379  ·  view source on GitHub ↗

Gets defined or externally defined (AvailableExternally linkage) value by name.

(&self, name: &str)

Source from the content-addressed store, hash-verified

368 /// Gets defined or externally defined (AvailableExternally linkage) value by
369 /// name.
370 pub fn get_defined_value(&self, name: &str) -> Option<&'ll Value> {
371 self.get_declared_value(name).and_then(|val| {
372 let declaration = unsafe { llvm::LLVMIsDeclaration(val) != 0 };
373 if !declaration {
374 Some(val)
375 } else {
376 None
377 }
378 })
379 }
380
381 pub(crate) fn get_intrinsic(&self, key: &str) -> &'ll Value {
382 trace!("Retrieving intrinsic with name `{}`", key);

Callers 1

define_globalMethod · 0.80

Calls 1

get_declared_valueMethod · 0.80

Tested by

no test coverage detected