[][src]Function rustc_codegen_llvm::declare::define_global

pub fn define_global<'ll>(
    cx: &CodegenCx<'ll, '_>,
    name: &str,
    ty: &'ll Type
) -> Option<&'ll Value>
🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Declare a global with an intention to define it.

Use this function when you intend to define a global. This function will return None if the name already has a definition associated with it. In that case an error should be reported to the user, because it usually happens due to user’s fault (e.g. misuse of #[no_mangle] or #[export_name] attributes).