summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.h
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/nodes.h
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/nodes.h')
-rw-r--r--compiler/optimizing/nodes.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index c00ac4e5d9..fd3a2757ab 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -54,6 +54,7 @@
namespace art {
class ArenaStack;
+class CodeGenerator;
class GraphChecker;
class HBasicBlock;
class HConstructorFence;
@@ -427,6 +428,7 @@ class HGraph : public ArenaObject<kArenaAllocGraph> {
}
std::ostream& Dump(std::ostream& os,
+ CodeGenerator* codegen,
std::optional<std::reference_wrapper<const BlockNamer>> namer = std::nullopt);
ArenaAllocator* GetAllocator() const { return allocator_; }
@@ -893,10 +895,6 @@ class HGraph : public ArenaObject<kArenaAllocGraph> {
DISALLOW_COPY_AND_ASSIGN(HGraph);
};
-inline std::ostream& operator<<(std::ostream& os, HGraph& graph) {
- return graph.Dump(os);
-}
-
class HLoopInformation : public ArenaObject<kArenaAllocLoopInfo> {
public:
HLoopInformation(HBasicBlock* header, HGraph* graph)