projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c232a65
)
As discussed on IRC, this stuff is just for debugging.
author
Chris Lattner
<sabre@nondot.org>
Thu, 14 Jul 2005 05:17:43 +0000
(
05:17
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 14 Jul 2005 05:17:43 +0000
(
05:17
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22432
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
index 8ab6783d56183d58a904026f7347f574d316a4e9..fbe6cdb9c55de3b174ccfdbc3d977e60247c17ea 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
+++ b/
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
}