Skip to main content

wrap_llcx

Function wrap_llcx 

Source
pub(crate) unsafe fn wrap_llcx<'ll>(
    llcx_raw: NonNull<ContextRaw>,
) -> Context<'ll>
Expand description

Converts an unbranded pointer-to-context to a lifetime-branded Context.

ยงSafety

  • The pointer must be a valid LLVM context.
  • If the context is passed to safe code, its caller-requested lifetime must be distinct from that of any other context, and must not outlive the underlying context.