resolver: Improve the ICE msg about nodes

Include the pointer - helps debugging

Change-Id: I50058095710eb528446bbd8d8e3069dd657c75c8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/49521
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2021-04-29 20:57:55 +00:00 committed by Commit Bot service account
parent 52456c69c8
commit f0756e347a
1 changed files with 5 additions and 2 deletions

View File

@ -266,7 +266,8 @@ bool Resolver::ResolveInternal() {
TINT_ICE(diagnostics_) << "AST node '" << node->TypeInfo().name
<< "' was not reached by the resolver\n"
<< "At: " << node->source() << "\n"
<< "Content: " << builder_->str(node);
<< "Content: " << builder_->str(node) << "\n"
<< "Pointer: " << node;
}
}
@ -2774,7 +2775,9 @@ void Resolver::Mark(const ast::Node* node) {
TINT_ICE(diagnostics_)
<< "AST node '" << node->TypeInfo().name
<< "' was encountered twice in the same AST of a Program\n"
<< "At: " << node->source();
<< "At: " << node->source() << "\n"
<< "Content: " << builder_->str(node) << "\n"
<< "Pointer: " << node;
}
Resolver::VariableInfo::VariableInfo(const ast::Variable* decl,