Commit 8ecdfcb
committed
[Dependency Scanning] Optionally, resolve direct dependencies of a module using only the
This speeds up contexts where we need to resolve dependencies after the main scanning action is complete.
For example: libSwiftScan binary graph generation and cycle detection.
This is necessary because ordinarily, ModuleDependenciesCache must be queried on a per-loader basis.
For example, we first search for Swift modules with the SerializedModuleLoaderBase, at which point we check the cache for previously-found Swift modules. If cache is not hit, we search the filesystem.
Then we search for Clang moduels with the ClangLoader, at which point we check the cache for previously-found Clang modules. If cache is not hit, we search the filesystem.
This change allows to eliminate a bunch of filesystem searching in step (1) when we know we have completed the scan and no longer need to be concerned with the correctness of the cache contents.ModuleDependenciesCache.1 parent 7e6536d commit 8ecdfcb
File tree
3 files changed
+36
-16
lines changed- include/swift/AST
- lib
- AST
- DependencyScan
3 files changed
+36
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
795 | 795 | | |
796 | 796 | | |
797 | 797 | | |
798 | | - | |
| 798 | + | |
| 799 | + | |
799 | 800 | | |
800 | 801 | | |
801 | 802 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1533 | 1533 | | |
1534 | 1534 | | |
1535 | 1535 | | |
1536 | | - | |
1537 | | - | |
1538 | | - | |
1539 | | - | |
1540 | | - | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
1541 | 1560 | | |
1542 | | - | |
1543 | | - | |
1544 | | - | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
1545 | 1565 | | |
1546 | 1566 | | |
1547 | 1567 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
| 157 | + | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | | - | |
167 | | - | |
168 | 167 | | |
169 | | - | |
| 168 | + | |
170 | 169 | | |
171 | 170 | | |
172 | 171 | | |
| |||
209 | 208 | | |
210 | 209 | | |
211 | 210 | | |
212 | | - | |
| 211 | + | |
213 | 212 | | |
214 | 213 | | |
215 | 214 | | |
| |||
761 | 760 | | |
762 | 761 | | |
763 | 762 | | |
764 | | - | |
| 763 | + | |
765 | 764 | | |
766 | 765 | | |
767 | 766 | | |
| |||
871 | 870 | | |
872 | 871 | | |
873 | 872 | | |
874 | | - | |
| 873 | + | |
875 | 874 | | |
876 | 875 | | |
877 | 876 | | |
| |||
0 commit comments