internal static BitcodeModule FromHandle(LLVMModuleRef nativeHandle) { var contextRef = nativeHandle.Context; Context context = ContextCache.GetContextFor(contextRef); return(context.GetModuleFor(nativeHandle)); }
private BitcodeModule(LLVMModuleRef handle) { ModuleHandle = handle; Context = ContextCache.GetContextFor(handle.Context); }
private static Context GetMeatadataContext(LLVMMetadataRef metadataHandle) { var hContext = LibLLVMGetNodeContext(metadataHandle).ThrowIfInvalid() !; return(ContextCache.GetContextFor(hContext)); }