Use the getFunctionNames method
authorChris Lattner <sabre@nondot.org>
Mon, 30 Jun 2003 05:57:39 +0000 (05:57 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 30 Jun 2003 05:57:39 +0000 (05:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7008 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/Printer.cpp

index f568c8d96717c4df0eea7a1d81de280f640aa65e..9c0c5d1e56c2f08907b424a5bbb4719e02c925c0 100644 (file)
@@ -68,14 +68,9 @@ template<>
 struct DOTGraphTraits<const DSGraph*> : public DefaultDOTGraphTraits {
   static std::string getGraphName(const DSGraph *G) {
     switch (G->getReturnNodes().size()) {
-    case 0: return "Global graph";
-    case 1: return "Function " + G->getReturnNodes().begin()->first->getName();
-    default:
-      std::string Return = "Functions: ";
-      for (DSGraph::ReturnNodesTy::const_iterator I=G->getReturnNodes().begin();
-           I != G->getReturnNodes().end(); ++I)
-        Return += I->first->getName() + " ";
-      return Return;
+    case 0: return G->getFunctionNames();
+    case 1: return "Function " + G->getFunctionNames();
+    default: return "Functions: " + G->getFunctionNames();
     }
   }