[llvm-commits] [llvm] r114829 - in /llvm/trunk/include/llvm: Analysis/DOTGraphTraitsPass.h Support/GraphWriter.h

Dan Gohman gohman at apple.com
Mon Sep 27 08:34:20 PDT 2010


Author: djg
Date: Mon Sep 27 10:34:19 2010
New Revision: 114829

URL: http://llvm.org/viewvc/llvm-project?rev=114829&view=rev
Log:
Remove WriteGraph's Name argument, which it didn't use, and
rename writeHeader's Name argument to Title, to be consistent
with WriteGraph.

Modified:
    llvm/trunk/include/llvm/Analysis/DOTGraphTraitsPass.h
    llvm/trunk/include/llvm/Support/GraphWriter.h

Modified: llvm/trunk/include/llvm/Analysis/DOTGraphTraitsPass.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DOTGraphTraitsPass.h?rev=114829&r1=114828&r2=114829&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/DOTGraphTraitsPass.h (original)
+++ llvm/trunk/include/llvm/Analysis/DOTGraphTraitsPass.h Mon Sep 27 10:34:19 2010
@@ -67,7 +67,7 @@
     Title = GraphName + " for '" + F.getNameStr() + "' function";
 
     if (ErrorInfo.empty())
-      WriteGraph(File, Graph, Simple, Name, Title);
+      WriteGraph(File, Graph, Simple, Title);
     else
       errs() << "  error opening file for writing!";
     errs() << "\n";

Modified: llvm/trunk/include/llvm/Support/GraphWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/GraphWriter.h?rev=114829&r1=114828&r2=114829&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/GraphWriter.h (original)
+++ llvm/trunk/include/llvm/Support/GraphWriter.h Mon Sep 27 10:34:19 2010
@@ -92,11 +92,11 @@
     DTraits = DOTTraits(SN);
   }
 
-  void writeHeader(const std::string &Name) {
+  void writeHeader(const std::string &Title) {
     std::string GraphName = DTraits.getGraphName(G);
 
-    if (!Name.empty())
-      O << "digraph \"" << DOT::EscapeString(Name) << "\" {\n";
+    if (!Title.empty())
+      O << "digraph \"" << DOT::EscapeString(Title) << "\" {\n";
     else if (!GraphName.empty())
       O << "digraph \"" << DOT::EscapeString(GraphName) << "\" {\n";
     else
@@ -105,8 +105,8 @@
     if (DTraits.renderGraphFromBottomUp())
       O << "\trankdir=\"BT\";\n";
 
-    if (!Name.empty())
-      O << "\tlabel=\"" << DOT::EscapeString(Name) << "\";\n";
+    if (!Title.empty())
+      O << "\tlabel=\"" << DOT::EscapeString(Title) << "\";\n";
     else if (!GraphName.empty())
       O << "\tlabel=\"" << DOT::EscapeString(GraphName) << "\";\n";
     O << DTraits.getGraphProperties(G);
@@ -282,7 +282,6 @@
 template<typename GraphType>
 raw_ostream &WriteGraph(raw_ostream &O, const GraphType &G,
                         bool ShortNames = false,
-                        const std::string &Name = "",
                         const std::string &Title = "") {
   // Start the graph emission process...
   GraphWriter<GraphType> W(O, G, ShortNames);
@@ -322,7 +321,7 @@
   raw_fd_ostream O(Filename.c_str(), ErrorInfo);
 
   if (ErrorInfo.empty()) {
-    llvm::WriteGraph(O, G, ShortNames, Name, Title);
+    llvm::WriteGraph(O, G, ShortNames, Title);
     errs() << " done. \n";
   } else {
     errs() << "error opening file '" << Filename.str() << "' for writing!\n";





More information about the llvm-commits mailing list