michael@0: // michael@0: // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. michael@0: // Use of this source code is governed by a BSD-style license that can be michael@0: // found in the LICENSE file. michael@0: // michael@0: michael@0: #ifndef COMPILER_DEPGRAPH_DEPENDENCY_GRAPH_OUTPUT_H michael@0: #define COMPILER_DEPGRAPH_DEPENDENCY_GRAPH_OUTPUT_H michael@0: michael@0: #include "compiler/depgraph/DependencyGraph.h" michael@0: #include "compiler/InfoSink.h" michael@0: michael@0: class TDependencyGraphOutput : public TDependencyGraphTraverser { michael@0: public: michael@0: TDependencyGraphOutput(TInfoSinkBase& sink) : mSink(sink) {} michael@0: virtual void visitSymbol(TGraphSymbol* symbol); michael@0: virtual void visitArgument(TGraphArgument* parameter); michael@0: virtual void visitFunctionCall(TGraphFunctionCall* functionCall); michael@0: virtual void visitSelection(TGraphSelection* selection); michael@0: virtual void visitLoop(TGraphLoop* loop); michael@0: virtual void visitLogicalOp(TGraphLogicalOp* logicalOp); michael@0: michael@0: void outputAllSpanningTrees(TDependencyGraph& graph); michael@0: private: michael@0: void outputIndentation(); michael@0: michael@0: TInfoSinkBase& mSink; michael@0: }; michael@0: michael@0: #endif // COMPILER_DEPGRAPH_DEPENDENCY_GRAPH_OUTPUT_H