MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
autogen.h
Go to the documentation of this file.
1#pragma once
2
3#include <mim/axiom.h>
4#include <mim/plugin.h>
5
6/// @namespace mim::plug::demo @ref demo
7namespace mim {
8namespace plug::demo {
9
10static constexpr plugin_t Plugin_Id = 0x1463900000000000;
11
12/// @name %%demo.const_idx
13///@{
14enum class const_idx : flags_t {
15};
16
18///@}
19
21
22#define MIM_demo_NORMALIZER_IMPL \
23 void register_normalizers(Normalizers& normalizers) {\
24 normalizers[flags_t(Annex::Base<const_idx>)] = &normalize_const; \
25 }
26} // namespace plug::demo
27
28#ifndef DOXYGEN // don't include in Doxygen documentation
29
30template<> constexpr flags_t Annex::Base<plug::demo::const_idx> = 0x1463900000000000;
31template<> constexpr size_t Annex::Num<plug::demo::const_idx> = 0;
32
33
34#endif
35} // namespace mim
36
37#ifndef DOXYGEN // don't include in Doxygen documentation
38
39
40#endif
Helper class to retrieve Infer::arg if present.
Definition def.h:86
Ref normalize_const(Ref type, Ref, Ref arg)
static constexpr plugin_t Plugin_Id
Definition autogen.h:10
void register_normalizers(Normalizers &normalizers)
Definition cfg.h:11
u64 flags_t
Definition types.h:45
absl::flat_hash_map< flags_t, NormalizeFn > Normalizers
Definition plugin.h:19
u64 plugin_t
Definition types.h:46
static constexpr size_t Num
Definition plugin.h:115
static constexpr flags_t Base
Definition plugin.h:118