diff options
| author | Dan Gohman <gohman@apple.com> | 2010-09-27 15:34:19 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-09-27 15:34:19 +0000 |
| commit | 24697d3b8d6eddcccf33ffef9457d9aaaec0775f (patch) | |
| tree | 36f2ea8df52cce9356b43a1f9a567ae66d39ff26 | |
| parent | 9a1b8598efc8f9482ba76d4ba77e9c20e16d175d (diff) | |
| download | bcm5719-llvm-24697d3b8d6eddcccf33ffef9457d9aaaec0775f.tar.gz bcm5719-llvm-24697d3b8d6eddcccf33ffef9457d9aaaec0775f.zip | |
Remove WriteGraph's Name argument, which it didn't use, and
rename writeHeader's Name argument to Title, to be consistent
with WriteGraph.
llvm-svn: 114829
| -rw-r--r-- | llvm/include/llvm/Analysis/DOTGraphTraitsPass.h | 2 | ||||
| -rw-r--r-- | llvm/include/llvm/Support/GraphWriter.h | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h b/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h index d8daf5196fc..30741c4970a 100644 --- a/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h +++ b/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h @@ -67,7 +67,7 @@ struct DOTGraphTraitsPrinter : public FunctionPass { 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"; diff --git a/llvm/include/llvm/Support/GraphWriter.h b/llvm/include/llvm/Support/GraphWriter.h index 07937ce36ca..5e91d2543e8 100644 --- a/llvm/include/llvm/Support/GraphWriter.h +++ b/llvm/include/llvm/Support/GraphWriter.h @@ -92,11 +92,11 @@ public: 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 @@ public: 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 @@ public: 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 @@ sys::Path WriteGraph(const GraphType &G, const std::string &Name, 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"; |

