summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2008-05-06 17:27:37 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2008-05-06 17:27:37 +0000
commitbbbc9d43848badabedddb27e84b26a804ad578fc (patch)
treeeb1b4f1ef20b2a9805cb9f35255531b46c4aa984 /tools
parentee628d93aaca6b4b052f6fe05eab580b2ce8e157 (diff)
downloadllvm-bbbc9d43848badabedddb27e84b26a804ad578fc.tar.gz
llvm-bbbc9d43848badabedddb27e84b26a804ad578fc.tar.bz2
llvm-bbbc9d43848badabedddb27e84b26a804ad578fc.tar.xz
Remove unnecessary argument from PassThroughGraph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50740 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvmc2/CompilationGraph.cpp11
-rw-r--r--tools/llvmc2/CompilationGraph.h2
2 files changed, 8 insertions, 5 deletions
diff --git a/tools/llvmc2/CompilationGraph.cpp b/tools/llvmc2/CompilationGraph.cpp
index 2dd8812827..90e88bb8dd 100644
--- a/tools/llvmc2/CompilationGraph.cpp
+++ b/tools/llvmc2/CompilationGraph.cpp
@@ -112,7 +112,7 @@ void CompilationGraph::insertEdge(const std::string& A, Edge* E) {
// Pass input file through the chain until we bump into a Join node or
// a node that says that it is the last.
const JoinTool*
-CompilationGraph::PassThroughGraph (sys::Path& In, sys::Path Out,
+CompilationGraph::PassThroughGraph (sys::Path& In,
const sys::Path& TempDir) const {
bool Last = false;
JoinTool* ret = 0;
@@ -124,6 +124,7 @@ CompilationGraph::PassThroughGraph (sys::Path& In, sys::Path Out,
const Node* N = &getNode(*TV.begin());
while(!Last) {
+ sys::Path Out;
Tool* CurTool = N->ToolPtr.getPtr();
if (CurTool->IsJoin()) {
@@ -162,14 +163,13 @@ CompilationGraph::PassThroughGraph (sys::Path& In, sys::Path Out,
int CompilationGraph::Build (const sys::Path& TempDir) const {
const JoinTool* JT = 0;
- sys::Path In, Out;
// For each input file
for (cl::list<std::string>::const_iterator B = InputFilenames.begin(),
E = InputFilenames.end(); B != E; ++B) {
- In = sys::Path(*B);
+ sys::Path In = sys::Path(*B);
- const JoinTool* NewJoin = PassThroughGraph(In, Out, TempDir);
+ const JoinTool* NewJoin = PassThroughGraph(In, TempDir);
if (JT && NewJoin && JT != NewJoin)
throw std::runtime_error("Graphs with multiple Join nodes"
"are not yet supported!");
@@ -178,6 +178,7 @@ int CompilationGraph::Build (const sys::Path& TempDir) const {
}
if (JT) {
+ sys::Path Out;
// If the final output name is empty, set it to "a.out"
if (!OutputFilename.empty()) {
Out = sys::Path(OutputFilename);
@@ -194,6 +195,8 @@ int CompilationGraph::Build (const sys::Path& TempDir) const {
return 0;
}
+// Code related to graph visualization.
+
namespace llvm {
template <>
struct DOTGraphTraits<llvmcc::CompilationGraph*>
diff --git a/tools/llvmc2/CompilationGraph.h b/tools/llvmc2/CompilationGraph.h
index bf46fa5978..b7f5d8e076 100644
--- a/tools/llvmc2/CompilationGraph.h
+++ b/tools/llvmc2/CompilationGraph.h
@@ -153,7 +153,7 @@ namespace llvmcc {
const tools_vector_type& getToolsVector(const std::string& LangName) const;
// Pass the input file through the toolchain.
- const JoinTool* PassThroughGraph (llvm::sys::Path& In, llvm::sys::Path Out,
+ const JoinTool* PassThroughGraph (llvm::sys::Path& In,
const llvm::sys::Path& TempDir) const;
};