Struct inkwell::values::GlobalValue [−][src]
pub struct GlobalValue<'ctx> { /* fields omitted */ }
Implementations
Determines whether or not a GlobalValue
is a declaration or a definition.
Example
use inkwell::context::Context;
let context = Context::create();
let builder = context.create_builder();
let module = context.create_module("my_mod");
let void_type = context.void_type();
let fn_type = void_type.fn_type(&[], false);
let fn_value = module.add_function("my_func", fn_type, None);
assert!(fn_value.as_global_value().is_declaration());
context.append_basic_block(fn_value, "entry");
assert!(!fn_value.as_global_value().is_declaration());
This is supported on crate features
llvm7-0
or llvm8-0
or llvm9-0
or llvm10-0
or llvm11-0
or llvm12-0
only.This is supported on crate features
llvm7-0
or llvm8-0
or llvm9-0
or llvm10-0
or llvm11-0
or llvm12-0
only.This is supported on crate features llvm8-0
or llvm9-0
or llvm10-0
or llvm11-0
or llvm12-0
only.
This is supported on crate features
llvm8-0
or llvm9-0
or llvm10-0
or llvm11-0
or llvm12-0
only.Sets a metadata of the given type on the GlobalValue
This is supported on crate features llvm7-0
or llvm8-0
or llvm9-0
or llvm10-0
or llvm11-0
or llvm12-0
only.
This is supported on crate features
llvm7-0
or llvm8-0
or llvm9-0
or llvm10-0
or llvm11-0
or llvm12-0
only.Gets a Comdat
assigned to this GlobalValue
, if any.
This is supported on crate features llvm7-0
or llvm8-0
or llvm9-0
or llvm10-0
or llvm11-0
or llvm12-0
only.
This is supported on crate features
llvm7-0
or llvm8-0
or llvm9-0
or llvm10-0
or llvm11-0
or llvm12-0
only.Assigns a Comdat
to this GlobalValue
.
This is supported on crate features
llvm7-0
or llvm8-0
or llvm9-0
or llvm10-0
or llvm11-0
or llvm12-0
only.This is supported on crate features
llvm7-0
or llvm8-0
or llvm9-0
or llvm10-0
or llvm11-0
or llvm12-0
only.Trait Implementations
Returns an enum containing a typed version of AnyValue
.
Prints a value to a LLVMString
Returns an enum containing a typed version of the BasicValue
.
Most BasicValue
s are the byproduct of an instruction
and so are convertable into an InstructionValue
Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<'ctx> RefUnwindSafe for GlobalValue<'ctx>
impl<'ctx> !Send for GlobalValue<'ctx>
impl<'ctx> !Sync for GlobalValue<'ctx>
impl<'ctx> Unpin for GlobalValue<'ctx>
impl<'ctx> UnwindSafe for GlobalValue<'ctx>
Blanket Implementations
Mutably borrows from an owned value. Read more