Commit 7426a4f
committed
[Dependency Scanning] Re-use cached queried Clang dependency info in subsequent scanning stages
Dependency Scanning is recursive over discovered Swift module overlays and cross-import overlays. In the main 'resolveImportedModuleDependencies' routine, after all Swift and Clang dependencies of the main module are discovered, the scanner looks up Swift overlays for discovered Clang modules. For each such Swift overlay, the scanner will then proceed to call 'resolveImportedModuleDependencies' on the overlay module.
On these subsequent recursive calls to 'resolveImportedModuleDependencies', Clang dependency resolution will re-query all imports of the overlay module which do not resolve to Swift modules, even if they had been queried previously in a parent invocation. This change adds the ability to re-use previously-queried-and-cached Clang module dependency information by having the dependency cache also store the set of visible modules which resulted from each by-name lookup.1 parent 6628635 commit 7426a4f
File tree
7 files changed
+228
-145
lines changed- include/swift
- AST
- DependencyScan
- lib
- AST
- DependencyScan
- test/ScanDependencies
7 files changed
+228
-145
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| |||
893 | 893 | | |
894 | 894 | | |
895 | 895 | | |
896 | | - | |
897 | | - | |
| 896 | + | |
| 897 | + | |
898 | 898 | | |
899 | | - | |
900 | | - | |
901 | | - | |
902 | | - | |
903 | | - | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
904 | 902 | | |
905 | 903 | | |
906 | 904 | | |
| |||
1073 | 1071 | | |
1074 | 1072 | | |
1075 | 1073 | | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
1076 | 1077 | | |
1077 | 1078 | | |
1078 | 1079 | | |
| |||
1111 | 1112 | | |
1112 | 1113 | | |
1113 | 1114 | | |
| 1115 | + | |
| 1116 | + | |
1114 | 1117 | | |
1115 | 1118 | | |
1116 | 1119 | | |
| |||
1152 | 1155 | | |
1153 | 1156 | | |
1154 | 1157 | | |
| 1158 | + | |
1155 | 1159 | | |
1156 | | - | |
1157 | | - | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
1158 | 1172 | | |
1159 | 1173 | | |
1160 | 1174 | | |
| |||
1230 | 1244 | | |
1231 | 1245 | | |
1232 | 1246 | | |
1233 | | - | |
1234 | | - | |
| 1247 | + | |
| 1248 | + | |
1235 | 1249 | | |
1236 | 1250 | | |
1237 | 1251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
40 | 48 | | |
41 | 49 | | |
42 | 50 | | |
| |||
306 | 314 | | |
307 | 315 | | |
308 | 316 | | |
309 | | - | |
| 317 | + | |
310 | 318 | | |
311 | 319 | | |
312 | 320 | | |
| |||
391 | 399 | | |
392 | 400 | | |
393 | 401 | | |
394 | | - | |
| 402 | + | |
395 | 403 | | |
396 | 404 | | |
397 | 405 | | |
398 | | - | |
399 | 406 | | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
| 407 | + | |
| 408 | + | |
404 | 409 | | |
405 | 410 | | |
406 | 411 | | |
407 | 412 | | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
| 413 | + | |
| 414 | + | |
413 | 415 | | |
414 | 416 | | |
415 | 417 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
774 | 777 | | |
775 | 778 | | |
776 | 779 | | |
| |||
856 | 859 | | |
857 | 860 | | |
858 | 861 | | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
859 | 872 | | |
860 | 873 | | |
861 | 874 | | |
| |||
948 | 961 | | |
949 | 962 | | |
950 | 963 | | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
959 | 986 | | |
960 | 987 | | |
961 | | - | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
962 | 1008 | | |
963 | 1009 | | |
964 | 1010 | | |
965 | 1011 | | |
966 | | - | |
| 1012 | + | |
967 | 1013 | | |
968 | 1014 | | |
969 | 1015 | | |
| |||
0 commit comments