@@ -87,14 +87,15 @@ class DependencyScanningTool {
8787 // / occurred, \c swiftscan_dependency_result_t otherwise.
8888 llvm::ErrorOr<swiftscan_dependency_graph_t >
8989 getDependencies (ArrayRef<const char *> Command,
90- const llvm::StringSet<> &PlaceholderModules);
90+ const llvm::StringSet<> &PlaceholderModules,
91+ StringRef WorkingDirectory);
9192
9293 // / Collect the set of imports for the input module
9394 // /
9495 // / \returns a \c StringError with the diagnostic output if errors
9596 // / occurred, \c swiftscan_prescan_result_t otherwise.
9697 llvm::ErrorOr<swiftscan_import_set_t >
97- getImports (ArrayRef<const char *> Command);
98+ getImports (ArrayRef<const char *> Command, StringRef WorkingDirectory );
9899
99100 // / Collect the full module dependency graph for the input collection of
100101 // / module names (batch inputs) and output them to the
@@ -104,7 +105,8 @@ class DependencyScanningTool {
104105 std::vector<llvm::ErrorOr<swiftscan_dependency_graph_t >>
105106 getDependencies (ArrayRef<const char *> Command,
106107 const std::vector<BatchScanInput> &BatchInput,
107- const llvm::StringSet<> &PlaceholderModules);
108+ const llvm::StringSet<> &PlaceholderModules,
109+ StringRef WorkingDirectory);
108110
109111 // / Writes the current `SharedCache` instance to a specified FileSystem path.
110112 void serializeCache (llvm::StringRef path);
@@ -121,13 +123,15 @@ class DependencyScanningTool {
121123 // / Using the specified invocation command, instantiate a CompilerInstance
122124 // / that will be used for this scan.
123125 llvm::ErrorOr<ScanQueryInstance>
124- initCompilerInstanceForScan (ArrayRef<const char *> Command);
126+ initCompilerInstanceForScan (ArrayRef<const char *> Command,
127+ StringRef WorkingDirectory);
125128
126129private:
127130 // / Using the specified invocation command, initialize the scanner instance
128131 // / for this scan. Returns the `CompilerInstance` that will be used.
129132 llvm::ErrorOr<ScanQueryInstance>
130- initScannerForAction (ArrayRef<const char *> Command);
133+ initScannerForAction (ArrayRef<const char *> Command,
134+ StringRef WorkingDirectory);
131135
132136 // / Shared cache of module dependencies, re-used by individual full-scan queries
133137 // / during the lifetime of this Tool.
0 commit comments