Commit Graph

3 Commits

Author SHA1 Message Date
Jordan Rose
5ad871ecd6 Adopt llvm::function_ref for callbacks that aren't persisted.
...removing a few other constructs that were doing the same thing
(mostly from me).

No functionality change.

Swift SVN r23294
2014-11-13 00:19:03 +00:00
Jordan Rose
a4a6b42604 [Driver] Only run compile jobs if needed.
This teaches the driver's Compilation to not run jobs where the base input
is older than the main output (r23221) when we're tracking dependencies.
After a compile command finishes, anything that depended on the file that
just got compiled will get scheduled.

This has the nice side effect of trying to rebuild changed files first.

The tests here aren't really testing the dependency graph yet, because the
files don't include any dependencies. I'll be adding several more test
scenarios in the next few commits.

Part of rdar://problem/15353101

Swift SVN r23273
2014-11-12 18:06:10 +00:00
Jordan Rose
8b5d763e39 [Driver] Add a new DependencyGraph class.
...and some basic unit tests for it.

The purpose of this class is to track dependencies between opaque nodes.
The dependency edges are (kind, string) pairs, where the "kind"
distinguishes different kinds of dependencies (currently "top-level names"
and "types that we do lookup on"). The step is to make use of it in
running compile commands.

The YAML-based file format is only for bring-up and testing purposes.
I intend to switch it to a bitcode-based format in the long run.

Part of rdar://problem/15353101

Swift SVN r23223
2014-11-11 00:43:29 +00:00