Move trace banners to driver and trace intermediate state. (#2443)

Printing intermediate state should be helpful to be able to examine the input when debugging later steps.

Intermediate state is hard to trace from the individual libraries since they don't know whether `dump` is going to print the state, so this moves some trace logic into the driver which is better equipped to make the decision.
This commit is contained in:
Jon Ross-Perkins
2022-12-07 09:17:54 -08:00
committed by GitHub
parent 9c8fd6864e
commit 60eb06ce94
4 changed files with 14 additions and 6 deletions
@@ -63,7 +63,6 @@ auto SemanticsParseTreeHandler::Build() -> void {
PrettyStackTraceNodeStack pretty_node_stack(this);
PrettyStackTraceNodeBlockStack pretty_node_block_stack(this);
CARBON_VLOG() << "*** SemanticsParseTreeHandler::Build Begin ***\n";
// Add a block for the ParseTree.
node_block_stack_.push_back(semantics_->AddNodeBlock());
@@ -85,7 +84,6 @@ auto SemanticsParseTreeHandler::Build() -> void {
CARBON_CHECK(it == range.end())
<< "FileEnd should always be last, found "
<< parse_tree_->node_kind(*it);
CARBON_VLOG() << "*** SemanticsParseTreeHandler::Build End ***\n";
return;
}
case ParseNodeKind::InfixOperator(): {