[llvm-commits] [llvm] r50740 - in /llvm/trunk/tools/llvmc2: CompilationGraph.cpp CompilationGraph.h

Mikhail Glushenkov foldr at codedgers.com
Tue May 6 10:27:37 PDT 2008


Author: foldr
Date: Tue May  6 12:27:37 2008
New Revision: 50740

URL: http://llvm.org/viewvc/llvm-project?rev=50740&view=rev
Log:
Remove unnecessary argument from PassThroughGraph

Modified:
    llvm/trunk/tools/llvmc2/CompilationGraph.cpp
    llvm/trunk/tools/llvmc2/CompilationGraph.h

Modified: llvm/trunk/tools/llvmc2/CompilationGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/CompilationGraph.cpp?rev=50740&r1=50739&r2=50740&view=diff

==============================================================================
--- llvm/trunk/tools/llvmc2/CompilationGraph.cpp (original)
+++ llvm/trunk/tools/llvmc2/CompilationGraph.cpp Tue May  6 12:27:37 2008
@@ -112,7 +112,7 @@
 // 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 @@
   const Node* N = &getNode(*TV.begin());
 
   while(!Last) {
+    sys::Path Out;
     Tool* CurTool = N->ToolPtr.getPtr();
 
     if (CurTool->IsJoin()) {
@@ -162,14 +163,13 @@
 
 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 @@
   }
 
   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 @@
   return 0;
 }
 
+// Code related to graph visualization.
+
 namespace llvm {
   template <>
   struct DOTGraphTraits<llvmcc::CompilationGraph*>

Modified: llvm/trunk/tools/llvmc2/CompilationGraph.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/CompilationGraph.h?rev=50740&r1=50739&r2=50740&view=diff

==============================================================================
--- llvm/trunk/tools/llvmc2/CompilationGraph.h (original)
+++ llvm/trunk/tools/llvmc2/CompilationGraph.h Tue May  6 12:27:37 2008
@@ -153,7 +153,7 @@
     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;
 
   };





More information about the llvm-commits mailing list