summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-07-14 05:17:43 +0000
committerChris Lattner <sabre@nondot.org>2005-07-14 05:17:43 +0000
commitfcc53ad6257de7f27de21c52a0f36505548e0fbf (patch)
tree6fc27d4868ed97cf17315c3c02cc4af53594ec31 /llvm/lib/CodeGen
parent0ac41946e1ecb5237d6d84b78cc8d4f4384d2b59 (diff)
downloadbcm5719-llvm-fcc53ad6257de7f27de21c52a0f36505548e0fbf.tar.gz
bcm5719-llvm-fcc53ad6257de7f27de21c52a0f36505548e0fbf.zip
As discussed on IRC, this stuff is just for debugging.
llvm-svn: 22432
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
index 8ab6783d561..fbe6cdb9c55 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
@@ -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
}
OpenPOWER on IntegriCloud