@@ -28,41 +28,46 @@ class ModuleDependenciesCache;
28
28
namespace dependencies {
29
29
30
30
struct BatchScanInput {
31
- StringRef moduleName;
32
- StringRef arguments;
33
- StringRef outputPath;
31
+ llvm:: StringRef moduleName;
32
+ llvm:: StringRef arguments;
33
+ llvm:: StringRef outputPath;
34
34
bool isSwift;
35
35
};
36
36
37
+ // MARK: swift-frontend -scan-dependencies entry points
37
38
// / Scans the dependencies of the main module of \c instance and writes out
38
39
// / the resulting JSON according to the instance's output parameters.
39
40
// / This method is used for swift-frontend invocations in dependency scanning mode
40
41
// / (-scan-dependencies), where the module dependency cache is not shared.
41
- bool scanAndOutputDependencies (CompilerInstance &instance);
42
-
43
- // / Scans the dependencies of the main module of \c instance.
44
- bool scanDependencies (CompilerInstance &instance,
45
- ModuleDependenciesCache &cache,
46
- llvm::raw_ostream &out);
42
+ bool scanDependencies (CompilerInstance &instance);
47
43
48
44
// / Batch scan the dependencies for modules specified in \c batchInputFile.
49
45
bool batchScanDependencies (CompilerInstance &instance,
50
- llvm::StringRef batchInputFile);
46
+ llvm::StringRef batchInputFile);
47
+
48
+ // / Identify all imports in the translation unit's module.
49
+ bool prescanMainModuleDependencies (CompilerInstance &instance);
51
50
52
51
52
+ // MARK: dependency scanning execution
53
+ // / Scans the dependencies of the main module of \c instance.
54
+ bool performModuleScan (CompilerInstance &instance,
55
+ ModuleDependenciesCache &cache,
56
+ llvm::raw_ostream &out);
57
+
53
58
// / Batch scan the dependencies for modules specified in \c batchInputFile.
54
- bool executeBatchModuleScan (CompilerInstance &instance,
59
+ bool performBatchModuleScan (CompilerInstance &instance,
55
60
ModuleDependenciesCache &cache,
56
61
llvm::StringSaver &saver,
57
62
const std::vector<BatchScanInput> &BatchInput);
58
63
59
64
// / Scan for dependencies of a module with a specified name, producing the resulting output
60
65
// / at the specified output path.
61
- bool executeSingleModuleScan (CompilerInstance &instance,
62
- ModuleDependenciesCache &cache,
63
- StringRef moduleName,
64
- bool isClang,
65
- StringRef outputPath);
66
+ bool scanBatchModuleEntry (CompilerInstance &instance,
67
+ ModuleDependenciesCache &cache,
68
+ llvm:: StringRef moduleName,
69
+ bool isClang,
70
+ llvm:: StringRef outputPath);
66
71
67
72
} // end namespace dependencies
68
73
} // end namespace swift
0 commit comments