Loom C API
Public Loom compiler C API
Loading...
Searching...
No Matches
base.h File Reference

LLVMIR target package identity and environment creation. More...

Go to the source code of this file.

Macros

#define LOOMC_ARTIFACT_FORMAT_LLVMIR_TEXT   "llvmir-text"
 Textual LLVM IR artifact format.
#define LOOMC_ARTIFACT_FORMAT_LLVMIR_BITCODE   "llvmir-bitcode"
 LLVM bitcode artifact format.

Functions

loomc_status_t loomc_target_environment_create_llvmir (loomc_allocator_t allocator, loomc_target_environment_t **out_target_environment)
 Creates a target environment containing the LLVMIR target package.

Detailed Description

LLVMIR target package identity and environment creation.

This header is the dependency-light entry point for embedders that want to link the LLVMIR oracle/debug target package. It does not require LLVM libraries or command-line tools; it emits textual LLVM IR or LLVM bitcode from prepared LLVMIR target-low modules.

Function Documentation

◆ loomc_target_environment_create_llvmir()

loomc_status_t loomc_target_environment_create_llvmir ( loomc_allocator_t allocator,
loomc_target_environment_t ** out_target_environment )

Creates a target environment containing the LLVMIR target package.

Parameters
allocatorHost allocator used for target-environment storage.
out_target_environmentReceives one retained target environment on success.
Returns
OK when the target environment was created.
Ownership
The caller owns the returned reference and releases it with loomc_target_environment_release.