Move SelectionDAG::viewGraph() out of line; as an inline function
authorDan Gohman <gohman@apple.com>
Wed, 30 Jul 2008 18:48:53 +0000 (18:48 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 30 Jul 2008 18:48:53 +0000 (18:48 +0000)
it isn't always visible to gdb.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54228 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/SelectionDAG.h
lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp

index 49dbd4347a14f0708f98b19d57373df74e67827c..3c1c031bd76ec0c809ca88cfe48aaf2912fd2116 100644 (file)
@@ -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;
index 19a3e49055ede60970f1f76a091564ac8232a6d8..ea86c0d591c5beb2a62f5e2ed8d78b2a34ca857f 100644 (file)
@@ -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).