MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
normalizers.cpp
Go to the documentation of this file.
1#include "mim/world.h"
2
4
5namespace mim::plug::demo {
6
7const Def* normalize_const(const Def* type, const Def*, const Def* arg) {
8 auto& world = type->world();
9 return world.lit(world.type_idx(arg), 42);
10}
11
13
14} // namespace mim::plug::demo
Base class for all Defs.
Definition def.h:198
World & world() const noexcept
Definition def.cpp:413
const Lit * lit(const Def *type, u64 val)
Definition world.cpp:464
#define MIM_demo_NORMALIZER_IMPL
Definition autogen.h:22
The demo Plugin
const Def * normalize_const(const Def *type, const Def *, const Def *arg)