diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2008-05-06 18:15:35 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2008-05-06 18:15:35 +0000 |
commit | de7fad129daf87ed9a9d811e9025b4f85845e6ac (patch) | |
tree | 663738f3bbffb5603d2748221315f8c38cf438be /llvm/tools/llvmc2/CompilationGraph.h | |
parent | a02084cff766d547751c64a43ba51962ba4886ca (diff) | |
download | bcm5719-llvm-de7fad129daf87ed9a9d811e9025b4f85845e6ac.tar.gz bcm5719-llvm-de7fad129daf87ed9a9d811e9025b4f85845e6ac.zip |
Refactoring: split the function CompilationGraph::Build() into two parts.
llvm-svn: 50760
Diffstat (limited to 'llvm/tools/llvmc2/CompilationGraph.h')
-rw-r--r-- | llvm/tools/llvmc2/CompilationGraph.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/tools/llvmc2/CompilationGraph.h b/llvm/tools/llvmc2/CompilationGraph.h index 1158d8df1d8..57deef30a5c 100644 --- a/llvm/tools/llvmc2/CompilationGraph.h +++ b/llvm/tools/llvmc2/CompilationGraph.h @@ -20,17 +20,16 @@ #include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/iterator" -//#include "llvm/ADT/SmallSet.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringMap.h" #include "llvm/System/Path.h" -#include <set> #include <string> namespace llvmc { - typedef std::set<std::string> InputLanguagesSet; + typedef llvm::SmallSet<std::string, 5> InputLanguagesSet; // An edge of the compilation graph. class Edge : public llvm::RefCountedBaseVPTR<Edge> { @@ -162,7 +161,7 @@ namespace llvmc { // the given language name. Throws std::runtime_error. const tools_vector_type& getToolsVector(const std::string& LangName) const; - // Pass the input file through the toolchain. + // Pass the input file through the toolchain starting at StartNode. void PassThroughGraph (const llvm::sys::Path& In, const Node* StartNode, const InputLanguagesSet& InLangs, const llvm::sys::Path& TempDir) const; @@ -172,6 +171,10 @@ namespace llvmc { const std::string* forceLanguage, InputLanguagesSet& InLangs) const; + // Traverse the initial parts of the toolchains. + void BuildInitial(InputLanguagesSet& InLangs, + const llvm::sys::Path& TempDir); + // Sort the nodes in topological order. void TopologicalSort(std::vector<const Node*>& Out); // Call TopologicalSort and filter the resulting list to include |