aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/GraphWriter.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-09-27 15:34:19 +0000
committerDan Gohman <gohman@apple.com>2010-09-27 15:34:19 +0000
commit4c6809d8e38b9690898700085ebbd913e035c2e2 (patch)
tree7b4e1cca7c5e4abe3e356991b1e415b78b8d3aa9 /include/llvm/Support/GraphWriter.h
parente0214d5b197aad569343665f5cf6b244747fe71c (diff)
Remove WriteGraph's Name argument, which it didn't use, and
rename writeHeader's Name argument to Title, to be consistent with WriteGraph. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114829 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/GraphWriter.h')
-rw-r--r--include/llvm/Support/GraphWriter.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/llvm/Support/GraphWriter.h b/include/llvm/Support/GraphWriter.h
index 07937ce36c..5e91d2543e 100644
--- a/include/llvm/Support/GraphWriter.h
+++ b/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";