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///@{
14#ifdef DOXYGEN // see https://github.com/doxygen/doxygen/issues/9668
16#else
17enum class const_idx : flags_t {
18#endif
19};
20
22///@}
23
25
26#define MIM_demo_NORMALIZER_IMPL \
27 void register_normalizers(Normalizers& normalizers) {\
28 normalizers[flags_t(Annex::Base<const_idx>)] = &normalize_const; \
29 }
30} // namespace plug::demo
31
32#ifndef DOXYGEN // don't include in Doxygen documentation
33template<> constexpr flags_t Annex::Base<plug::demo::const_idx> = 0x1463900000000000;
34template<> constexpr size_t Annex::Num<plug::demo::const_idx> = 0;
35
36#endif
37} // namespace mim
Helper class to retrieve Infer::arg if present.
Definition def.h:85
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