MimIR
0.1
MimIR is my Intermediate Representation
Toggle main menu visibility
Main Page
Documentation
Mim Command-Line Reference
Mim Language Reference
Coding & Debugging
Developer Guide
Passes
Plugins
affine
autodiff
clos
compile
core
demo
direct
math
matrix
mem
opt
refly
regex
tuple
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
Variables
Typedefs
a
b
d
f
g
j
l
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
i
j
l
m
n
p
q
r
s
t
v
w
z
Concepts
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
~
Variables
a
b
c
d
f
g
i
l
m
n
o
p
r
s
t
w
Typedefs
Enumerations
Enumerator
Related Symbols
a
b
c
f
i
l
n
o
p
s
w
Files
File List
File Members
All
a
c
d
e
g
h
i
m
r
v
w
Functions
Typedefs
Macros
a
c
d
e
g
h
i
m
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Concepts
Loading...
Searching...
No Matches
dbg.cpp
Go to the documentation of this file.
1
#include "
mim/util/dbg.h
"
2
3
#include <fe/loc.cpp.h>
4
5
namespace
mim
{
6
7
void
Error::clear
() {
8
num_errors_ = 0;
9
num_warnings_ = 0;
10
num_notes_ = 0;
11
msgs_.clear();
12
}
7
void
Error::clear
() {
…
}
13
14
/// If errors occured, claim them and throw; if warnings occured, claim them and report to @p os.
15
void
Error::ack
(std::ostream& os) {
16
auto
e = std::move(*
this
);
17
if
(e.num_errors() != 0)
throw
e;
18
if
(e.num_warnings() != 0)
print
(os,
"{} warning(s) encountered\n{}"
, e.num_warnings(), e);
19
}
15
void
Error::ack
(std::ostream& os) {
…
}
20
21
}
// namespace mim
mim::Error::clear
void clear()
Definition
dbg.cpp:7
mim::Error::ack
void ack(std::ostream &os=std::cerr)
If errors occured, claim them and throw; if warnings occured, claim them and report to os.
Definition
dbg.cpp:15
dbg.h
mim
Definition
ast.h:14
mim::print
std::ostream & print(std::ostream &os, const char *s)
Base case.
Definition
print.cpp:5
src
mim
util
dbg.cpp
Generated by
1.13.2