summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CompilerDriver
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2009-03-27 12:57:14 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2009-03-27 12:57:14 +0000
commitf4be420def6f15cb50e8de26a83ecf8f574f5031 (patch)
tree3a8e4bd366dee6584dd2e5a2643090f874e81e8c /llvm/lib/CompilerDriver
parent99d0b2353e3ea08441d65aa08c23a870d0a4bc75 (diff)
downloadbcm5719-llvm-f4be420def6f15cb50e8de26a83ecf8f574f5031.tar.gz
bcm5719-llvm-f4be420def6f15cb50e8de26a83ecf8f574f5031.zip
-write-graph now can be used with -o.
Makes it possible to set the output file name. llvm-svn: 67835
Diffstat (limited to 'llvm/lib/CompilerDriver')
-rw-r--r--llvm/lib/CompilerDriver/CompilationGraph.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/lib/CompilerDriver/CompilationGraph.cpp b/llvm/lib/CompilerDriver/CompilationGraph.cpp
index 6112cfe1b52..dece4e8e0ae 100644
--- a/llvm/lib/CompilerDriver/CompilationGraph.cpp
+++ b/llvm/lib/CompilerDriver/CompilationGraph.cpp
@@ -465,9 +465,6 @@ int CompilationGraph::Check () {
// Check for cycles.
ret += this->CheckCycles();
- if (!ret)
- std::cerr << "check-graph: no errors found.\n";
-
return ret;
}
@@ -519,18 +516,18 @@ namespace llvm {
}
-void CompilationGraph::writeGraph() {
- std::ofstream O("compilation-graph.dot");
+void CompilationGraph::writeGraph(const std::string& OutputFilename) {
+ std::ofstream O(OutputFilename.c_str());
if (O.good()) {
- std::cerr << "Writing 'compilation-graph.dot' file...";
+ std::cerr << "Writing '"<< OutputFilename << "' file...";
llvm::WriteGraph(O, this);
std::cerr << "done.\n";
O.close();
}
else {
- throw std::runtime_error("Error opening file 'compilation-graph.dot'"
- " for writing!");
+ throw std::runtime_error("Error opening file '" + OutputFilename
+ + "' for writing!");
}
}
OpenPOWER on IntegriCloud