2021-09-27 14:02:44 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
#include "sir/sir.h"
|
|
|
|
|
2021-10-04 12:10:59 -05:00
|
|
|
namespace codon {
|
2021-09-27 14:02:44 -04:00
|
|
|
namespace ir {
|
|
|
|
namespace util {
|
|
|
|
|
|
|
|
/// Formats an IR node.
|
|
|
|
/// @param node the node
|
|
|
|
/// @return the formatted node
|
|
|
|
std::string format(const Node *node);
|
|
|
|
|
|
|
|
/// Formats an IR node to an IO stream.
|
|
|
|
/// @param os the output stream
|
|
|
|
/// @param node the node
|
|
|
|
/// @return the resulting output stream
|
|
|
|
std::ostream &format(std::ostream &os, const Node *node);
|
|
|
|
|
|
|
|
} // namespace util
|
|
|
|
} // namespace ir
|
2021-10-04 12:10:59 -05:00
|
|
|
} // namespace codon
|