Loom C API
Public Loom compiler C API
Loading...
Searching...
No Matches
context.h
Go to the documentation of this file.
1// Copyright 2026 The IREE Authors
2//
3// Licensed under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
7#ifndef LOOMC_CONTEXT_H_
8#define LOOMC_CONTEXT_H_
9
10#include "loomc/status.h"
11
51
52#ifdef __cplusplus
53extern "C" {
54#endif
55
64
76
99
115 const loomc_context_options_t* options, loomc_allocator_t allocator,
116 loomc_context_t** out_context);
117
125
134
135#ifdef __cplusplus
136} // extern "C"
137#endif
138
139#endif // LOOMC_CONTEXT_H_
#define LOOMC_API_EXPORT
Exports a public Loom C API symbol from a shared library build.
Definition base.h:34
size_t loomc_host_size_t
Host allocation and container size type.
Definition base.h:45
loomc_structure_type_t
Structure type values used by extensible public descriptors.
Definition base.h:181
struct iree_status_handle_t * loomc_status_t
Opaque status handle.
Definition base.h:55
struct loomc_context_t loomc_context_t
Immutable Loom API context.
Definition context.h:63
loomc_status_t loomc_context_create(const loomc_context_options_t *options, loomc_allocator_t allocator, loomc_context_t **out_context)
Creates a reusable Loom API context.
void loomc_context_retain(loomc_context_t *context)
Retains context for another owner.
void loomc_context_release(loomc_context_t *context)
Releases context from one owner.
loomc_source_retention_t
Retention policy for source contents used to enrich diagnostics.
Definition context.h:66
@ LOOMC_SOURCE_RETENTION_EXACT
Retain exact source contents referenced by admitted IR.
Definition context.h:69
@ LOOMC_SOURCE_RETENTION_METADATA_ONLY
Retain source identifiers and available coordinates without source contents.
Definition context.h:74
Status codes and rich infrastructure error reporting.
Host allocator used for persistent Loom object storage.
Definition base.h:414
Context creation options.
Definition context.h:82
loomc_host_size_t structure_size
Size of this structure in bytes.
Definition context.h:88
loomc_structure_type_t type
Structure type.
Definition context.h:85
const void * next
Extension chain for context options such as loomc_context_target_options_t.
Definition context.h:92
loomc_source_retention_t source_retention
Source-content retention for operations using this context.
Definition context.h:97