mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
As discussed on IRC, this stuff is just for debugging.
llvm-svn: 22432
This commit is contained in:
parent
878f3f051f
commit
d9f1a60c61
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user