As discussed on IRC, this stuff is just for debugging.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22432 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-07-14 05:17:43 +00:00
parent c232a65827
commit e388b5ea2c

View File

@ -102,6 +102,10 @@ std::string DOTGraphTraits<SelectionDAG*>::getNodeLabel(const SDNode *Node,
/// rendered using 'dot'.
///
void SelectionDAG::viewGraph() {
// This code is only for debugging!
#ifdef NDEBUG
std::cerr << "SelectionDAG::viewGraph is only available in debug builds!\n";
#else
std::string Filename = "/tmp/dag." +
getMachineFunction().getFunction()->getName() + ".dot";
std::cerr << "Writing '" << Filename << "'... ";
@ -134,4 +138,5 @@ void SelectionDAG::viewGraph() {
system("gv /tmp/dag.tempgraph.ps");
}
system(("rm " + Filename + " /tmp/dag.tempgraph.ps").c_str());
#endif
}