Struct llvm::Context
[−]
[src]
pub struct Context;
Contains all the LLVM entities - mainly modules.
Every single entity attached to it has its lifetime to enforce the rule that things from different contexts cannot interact and to preserve pointer safety.
Methods
impl Context
[src]
unsafe fn get_global() -> &'static Context
Get a reference to the global context.
This is marked as unsafe because this can result in undefined behaviour in a multithreaded context if they all use the same context.
fn new() -> CBox<Self>
Create a new context, which is owned by the callee block.
Trait Implementations
impl Eq for Context
[src]
impl PartialEq<Context> for Context
[src]
fn eq(&self, other: &Context) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<Context> for &'a Context
[src]
fn eq(&self, other: &Context) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> From<LLVMContextRef> for &'a Context
[src]
fn from(ty: LLVMContextRef) -> &'a Context
Performs the conversion.
impl<'a> From<LLVMContextRef> for &'a mut Context
[src]
fn from(ty: LLVMContextRef) -> &'a mut Context
Performs the conversion.
impl DisposeRef for Context
[src]
type RefTo = LLVMContext
What a reference to this type represents as a C pointer.
unsafe fn dispose(ptr: *mut LLVMContext)
Destroy the contents at the pointer's location. Read more