[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Jul 13 22:17:54 PDT 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAGPrinter.cpp updated: 1.13 -> 1.14
---
Log message:
As discussed on IRC, this stuff is just for debugging.
---
Diffs of the changes: (+5 -0)
SelectionDAGPrinter.cpp | 5 +++++
1 files changed, 5 insertions(+)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.13 llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.14
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.13 Wed Jul 13 20:10:55 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp Thu Jul 14 00:17:43 2005
@@ -102,6 +102,10 @@
/// 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 @@
system("gv /tmp/dag.tempgraph.ps");
}
system(("rm " + Filename + " /tmp/dag.tempgraph.ps").c_str());
+#endif
}
More information about the llvm-commits
mailing list