Cthulhu
0.2.10
Cthulhu compiler collection
target.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-3.0-only
2
3
#pragma once
4
5
#include <ctu_target_api.h>
6
7
#include "
core/compiler.h
"
8
#include "
core/analyze.h
"
9
10
typedef
struct
arena_t
arena_t
;
11
typedef
struct
logger_t
logger_t
;
12
typedef
struct
fs_t
fs_t
;
13
14
typedef
struct
vector_t
vector_t
;
15
typedef
struct
map_t
map_t
;
16
17
typedef
struct
cfg_group_t
cfg_group_t
;
18
19
CT_BEGIN_API
20
25
27
typedef
enum
file_layout_t
28
{
29
#define FILE_LAYOUT(ID, STR) ID,
30
#include "
target.inc
"
31
eFileLayoutCount
32
}
file_layout_t
;
33
35
typedef
struct
emit_t
36
{
38
arena_t
*
arena
;
39
41
logger_t
*
logger
;
42
44
fs_t
*
fs
;
45
47
file_layout_t
layout
;
48
}
emit_t
;
49
50
CT_CONSTFN
51
CT_TARGET_API
const
char
*
file_layout_str
(
IN_DOMAIN
(<,
eFileLayoutCount
)
file_layout_t
layout);
52
54
55
CT_END_API
analyze.h
compiler.h
IN_DOMAIN
#define IN_DOMAIN(cmp, it)
annotate a parameter as being bounded by the expression of cmp and it
CT_CONSTFN
#define CT_CONSTFN
mark a function as const, has no side effects and always returns the same value for the same argument...
Definition:
analyze.h:227
file_layout_t
file_layout_t
output folder structure
Definition:
broker.h:91
CT_BEGIN_API
#define CT_BEGIN_API
Definition:
compiler.h:129
CT_END_API
#define CT_END_API
Definition:
compiler.h:130
file_layout_str
CT_CONSTFN CT_TARGET_API const char * file_layout_str(file_layout_t layout)
Definition:
target.c:13
file_layout_t
file_layout_t
output folder structure
Definition:
target.h:28
eFileLayoutCount
@ eFileLayoutCount
Definition:
target.h:31
arena_t
an allocator object
Definition:
arena.h:86
cfg_group_t
Definition:
common.h:35
emit_t
target code emitter options
Definition:
common.h:16
emit_t::arena
arena_t * arena
arena to use
Definition:
common.h:17
emit_t::fs
fs_t * fs
output filesystem
Definition:
target.h:44
emit_t::layout
file_layout_t layout
output layout
Definition:
target.h:47
emit_t::logger
logger_t * logger
reporting sink
Definition:
target.h:41
fs_t
Definition:
common.h:72
logger_t
a logging sink
Definition:
notify.c:14
map_t
an unordered hash map
Definition:
map.h:38
vector_t
a generic vector of pointers
Definition:
vector.c:16
target.inc
target
target
include
target
target.h
Generated by
1.9.1