diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2008-05-06 17:23:50 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2008-05-06 17:23:50 +0000 |
commit | 6ec1761ef63924d678c9345ba1bf5fea310d1070 (patch) | |
tree | 288aeecb85de7d565970bd28400872f238c1c0eb /llvm/tools/llvmc2/CompilationGraph.h | |
parent | 1c41c6d73405a8463d2e9ee95c9d1927e4fc36fb (diff) | |
download | bcm5719-llvm-6ec1761ef63924d678c9345ba1bf5fea310d1070.tar.gz bcm5719-llvm-6ec1761ef63924d678c9345ba1bf5fea310d1070.zip |
Add an ability to choose between different edges based on edge properties.
llvm-svn: 50732
Diffstat (limited to 'llvm/tools/llvmc2/CompilationGraph.h')
-rw-r--r-- | llvm/tools/llvmc2/CompilationGraph.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/tools/llvmc2/CompilationGraph.h b/llvm/tools/llvmc2/CompilationGraph.h index d953aeea900..18c1e6b3b5f 100644 --- a/llvm/tools/llvmc2/CompilationGraph.h +++ b/llvm/tools/llvmc2/CompilationGraph.h @@ -45,7 +45,7 @@ namespace llvmcc { class SimpleEdge : public Edge { public: SimpleEdge(const std::string& T) : Edge(T) {} - bool isEnabled() const { return true;} + bool isEnabled() const { return false;} bool isDefault() const { return true;} }; @@ -60,12 +60,16 @@ namespace llvmcc { Node(CompilationGraph* G, Tool* T) : OwningGraph(G), ToolPtr(T) {} bool HasChildren() const { return !OutEdges.empty(); } + const std::string Name() const { return ToolPtr->Name(); } iterator EdgesBegin() { return OutEdges.begin(); } const_iterator EdgesBegin() const { return OutEdges.begin(); } iterator EdgesEnd() { return OutEdges.end(); } const_iterator EdgesEnd() const { return OutEdges.end(); } + // Choose one of the edges based on command-line options. + const Edge* ChooseEdge() const; + // Takes ownership of the object. void AddEdge(Edge* E) { OutEdges.push_back(llvm::IntrusiveRefCntPtr<Edge>(E)); } |