Loom C API
Public Loom compiler C API
Loading...
Searching...
No Matches
diagnostic.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_DIAGNOSTIC_H_
8#define LOOMC_DIAGNOSTIC_H_
9
10#include "loomc/source.h"
11
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
34
66
85
86#ifdef __cplusplus
87} // extern "C"
88#endif
89
90#endif // LOOMC_DIAGNOSTIC_H_
size_t loomc_host_size_t
Host allocation and container size type.
Definition base.h:45
loomc_diagnostic_severity_t
Diagnostic severity.
Definition diagnostic.h:24
@ LOOMC_DIAGNOSTIC_SEVERITY_NOTE
Informational note.
Definition diagnostic.h:26
@ LOOMC_DIAGNOSTIC_SEVERITY_ERROR
Error that makes the operation fail.
Definition diagnostic.h:32
@ LOOMC_DIAGNOSTIC_SEVERITY_WARNING
Warning that does not make the operation fail.
Definition diagnostic.h:29
Immutable source handles used by parsing, indexing, linking, and compiling.
struct loomc_source_t loomc_source_t
Immutable source handle.
Definition source.h:80
Borrowed diagnostic view owned by a result object.
Definition diagnostic.h:72
loomc_string_view_t message
Human-readable rendered message.
Definition diagnostic.h:80
loomc_string_view_t code
Stable diagnostic code.
Definition diagnostic.h:77
loomc_source_range_t range
Primary source range.
Definition diagnostic.h:83
loomc_diagnostic_severity_t severity
Diagnostic severity.
Definition diagnostic.h:74
Source range attached to a diagnostic.
Definition diagnostic.h:44
uint32_t start_line
One-based starting line, or zero when unavailable.
Definition diagnostic.h:55
uint32_t start_column
One-based starting column, or zero when unavailable.
Definition diagnostic.h:58
const loomc_source_t * source
Source handle that owns or identifies the bytes.
Definition diagnostic.h:46
uint32_t end_column
One-based ending column, or zero when unavailable.
Definition diagnostic.h:64
loomc_host_size_t start
First byte in source contents covered by the range.
Definition diagnostic.h:49
loomc_host_size_t end
One-past-last byte in source contents covered by the range.
Definition diagnostic.h:52
uint32_t end_line
One-based ending line, or zero when unavailable.
Definition diagnostic.h:61
Non-owning string view over bytes that need not be NUL-terminated.
Definition base.h:63