MimIR
0.2-dev
MimIR is my Intermediate Representation
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
() { msgs_.clear(); }
8
9
/// If errors occurred, claim them and throw; if warnings occurred, claim them and report to @p os.
10
void
Error::ack
(std::ostream& os) {
11
auto
e = std::move(*
this
);
12
if
(e.num_errors() != 0)
throw
e;
13
if
(e.num_warnings() != 0) std::print(os,
"{} warning(s) encountered\n{}"
, e.num_warnings(), e);
14
}
15
16
}
// namespace mim
mim::Error::clear
void clear()
Definition
dbg.cpp:7
mim::Error::ack
void ack(std::ostream &os=std::cerr)
If errors occurred, claim them and throw; if warnings occurred, claim them and report to os.
Definition
dbg.cpp:10
dbg.h
mim
Definition
ast.h:14
src
mim
util
dbg.cpp
Generated by
1.16.1