Utilize topological sort in CompilationGraph::Build().
This makes more interesting graph topologies possible. Currently all tests pass,
but more testing is needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50744 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llvmc2/Tool.h b/tools/llvmc2/Tool.h
index 5136468..b4478f9 100644
--- a/tools/llvmc2/Tool.h
+++ b/tools/llvmc2/Tool.h
@@ -55,16 +55,17 @@
// Join tools have an input file list associated with them.
class JoinTool : public Tool {
public:
- void AddToJoinList(const llvm::sys::Path& P) { JoinList.push_back(P); }
- void ClearJoinList() { JoinList.clear(); }
+ void AddToJoinList(const llvm::sys::Path& P) { JoinList_.push_back(P); }
+ void ClearJoinList() { JoinList_.clear(); }
+ bool JoinListEmpty() const { return JoinList_.empty(); }
Action GenerateAction(const llvm::sys::Path& outFile) const
- { return GenerateAction(JoinList, outFile); }
- // We shouldn't shadow GenerateAction from the base class.
+ { return GenerateAction(JoinList_, outFile); }
+ // We shouldn't shadow base class's version of GenerateAction.
using Tool::GenerateAction;
private:
- PathVector JoinList;
+ PathVector JoinList_;
};
}