LLVM API Documentation
#include <CompilationGraph.h>
Public Types | |
| typedef nodes_map_type::iterator | nodes_iterator |
| typedef nodes_map_type::const_iterator | const_nodes_iterator |
Public Member Functions | |
| CompilationGraph () | |
| void | insertNode (Tool *T) |
| void | insertEdge (const std::string &A, Edge *E) |
| int | Build (llvm::sys::Path const &TempDir, const LanguageMap &LangMap) |
| int | Check () |
| Node & | getNode (const std::string &ToolName) |
| const Node & | getNode (const std::string &ToolName) const |
| void | viewGraph () |
| void | writeGraph (const std::string &OutputFilename) |
| writeGraph - Write Graphviz .dot source file to the current direcotry. | |
Friends | |
| NodesIterator | GraphBegin (CompilationGraph *) |
| NodesIterator | GraphEnd (CompilationGraph *) |
Definition at line 108 of file CompilationGraph.h.
Definition at line 126 of file CompilationGraph.h.
Definition at line 127 of file CompilationGraph.h.
| CompilationGraph::CompilationGraph | ( | ) |
| void CompilationGraph::insertNode | ( | Tool * | T | ) |
insertNode - Insert a new node into the graph. Takes ownership of the object.
Definition at line 123 of file CompilationGraph.cpp.
References llvm::StringMap< ValueTy, AllocatorTy >::count(), llvmc::Tool::Name(), and Node.
| void CompilationGraph::insertEdge | ( | const std::string & | A, | |
| Edge * | E | |||
| ) |
insertEdge - Insert a new edge into the graph. Takes ownership of the Edge object.
Definition at line 128 of file CompilationGraph.cpp.
References llvmc::Node::AddEdge(), getNode(), llvmc::Node::IncrInEdges(), llvmc::Edge::ToolName(), and llvmc::Node::ToolPtr.
| int CompilationGraph::Build | ( | llvm::sys::Path const & | TempDir, | |
| const LanguageMap & | LangMap | |||
| ) |
Build - Build target(s) from the input file set. Command-line options are passed implicitly as global variables.
Definition at line 295 of file CompilationGraph.cpp.
References ChooseEdge(), llvmc::Action::Execute(), llvmc::JoinTool::GenerateAction(), getNode(), llvmc::Node::HasChildren(), llvmc::JoinTool::JoinListEmpty(), llvmc::Node::Name(), llvmc::Node::OutEdges, llvmc::Action::OutFile(), llvmc::Action::StopCompilation(), and llvmc::Node::ToolPtr.
Referenced by BuildTargets().
| int CompilationGraph::Check | ( | ) |
Check - Check the compilation graph for common errors like cycles, input/output language mismatch and multiple default edges. Prints error messages and in case it finds any errors.
Definition at line 451 of file CompilationGraph.cpp.
Referenced by llvmc::Main().
| Node & CompilationGraph::getNode | ( | const std::string & | ToolName | ) |
getNode - Return a reference to the node correponding to the given tool name. Throws std::runtime_error.
Definition at line 98 of file CompilationGraph.cpp.
References llvm::StringMap< ValueTy, AllocatorTy >::end(), and llvm::StringMap< ValueTy, AllocatorTy >::find().
Referenced by Build(), llvm::GraphTraits< llvmc::CompilationGraph * >::getEntryNode(), insertEdge(), and llvmc::NodeChildIterator::operator*().
| const Node & CompilationGraph::getNode | ( | const std::string & | ToolName | ) | const |
Definition at line 105 of file CompilationGraph.cpp.
References llvm::StringMap< ValueTy, AllocatorTy >::end(), and llvm::StringMap< ValueTy, AllocatorTy >::find().
| void CompilationGraph::viewGraph | ( | ) |
viewGraph - This function is meant for use from the debugger. You can just say 'call G->viewGraph()' and a ghostview window should pop up from the program, displaying the compilation graph. This depends on there being a 'dot' and 'gv' program in your path.
Definition at line 531 of file CompilationGraph.cpp.
References llvm::ViewGraph().
Referenced by llvmc::Main().
| void CompilationGraph::writeGraph | ( | const std::string & | OutputFilename | ) |
writeGraph - Write Graphviz .dot source file to the current direcotry.
Definition at line 516 of file CompilationGraph.cpp.
References llvm::errs(), llvm::SystemZCC::O, and llvm::WriteGraph().
Referenced by llvmc::Main().
| NodesIterator GraphBegin | ( | CompilationGraph * | G | ) | [friend] |
Definition at line 235 of file CompilationGraph.h.
| NodesIterator GraphEnd | ( | CompilationGraph * | G | ) | [friend] |
Definition at line 239 of file CompilationGraph.h.