Commit 7a52e179 authored by mtrofin's avatar mtrofin Committed by Commit bot

[turbofan] Print API for Node.

Node has an operator<<, however, constructing an ostream in a debugger
session is non-trivial, hence this method.

BUG=

Review URL: https://codereview.chromium.org/1488953003

Cr-Commit-Position: refs/heads/master@{#32439}
parent 45e29ac2
......@@ -271,6 +271,12 @@ bool Node::OwnedBy(Node const* owner1, Node const* owner2) const {
}
void Node::Print() const {
OFStream os(stdout);
os << *this << std::endl;
}
Node::Node(NodeId id, const Operator* op, int inline_count, int inline_capacity)
: op_(op),
type_(nullptr),
......
......@@ -186,6 +186,7 @@ class Node final {
// Returns true if {owner1} and {owner2} are the only users of {this} node.
bool OwnedBy(Node const* owner1, Node const* owner2) const;
void Print() const;
private:
struct Use;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment