summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2022-01-10 09:31:57 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2022-01-10 15:18:43 +0000
commit22df3e0b8674d32d493fb499cae750f57b2fa5d2 (patch)
treee78aa8031c77ad8a381ab8285b570d5ceb4d94d9 /compiler/optimizing/optimizing_compiler.cc
parent7156ea283a43a64fed3b38004ee38c86cfcf7817 (diff)
Remove operator<< from HGraph.
It needs access to a code generator. Test: observe a bogus graph at the point of register allocator, and see that the Dump method crashes. Change-Id: I09a847246428fd3bd0938f9f457773c465da253d
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r--compiler/optimizing/optimizing_compiler.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 18e0512c6e..cb40a51aee 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -191,8 +191,10 @@ class PassObserver : public ValueObject {
GraphChecker checker(graph_, codegen_);
last_seen_graph_size_ = checker.Run(pass_change, last_seen_graph_size_);
if (!checker.IsValid()) {
+ std::ostringstream stream;
+ graph_->Dump(stream, codegen_);
LOG(FATAL_WITHOUT_ABORT) << "Error after " << pass_name << "(" << graph_->PrettyMethod()
- << "): " << *graph_;
+ << "): " << stream.str();
LOG(FATAL) << "(" << pass_name << "): " << Dumpable<GraphChecker>(checker);
}
}