aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/CodeGen/SelectionDAG.h2
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h
index 49dbd4347a..3c1c031bd7 100644
--- a/include/llvm/CodeGen/SelectionDAG.h
+++ b/include/llvm/CodeGen/SelectionDAG.h
@@ -117,7 +117,7 @@ public:
/// viewGraph - Pop up a GraphViz/gv window with the DAG rendered using 'dot'.
///
void viewGraph(const std::string &Title);
- void viewGraph() { return viewGraph(""); }
+ void viewGraph();
#ifndef NDEBUG
std::map<const SDNode *, std::string> NodeGraphAttrs;
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
index 19a3e49055..ea86c0d591 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
@@ -252,6 +252,11 @@ void SelectionDAG::viewGraph(const std::string &Title) {
#endif // NDEBUG
}
+// This overload is defined out-of-line here instead of just using a
+// default parameter because this is easiest for gdb to call.
+void SelectionDAG::viewGraph() {
+ viewGraph("");
+}
/// clearGraphAttrs - Clear all previously defined node graph attributes.
/// Intended to be used from a debugging tool (eg. gdb).