File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ struct SwiftExtractorState {
21
21
std::unordered_set<const swift::ModuleDecl*> encounteredModules;
22
22
23
23
std::vector<std::filesystem::path> sourceFiles;
24
+
25
+ // The path for the modules outputted by the underlying frontend run, ignoring path redirection
26
+ std::vector<std::filesystem::path> originalOutputModules;
24
27
};
25
28
26
29
} // namespace codeql
Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ static void lockOutputSwiftModuleTraps(codeql::SwiftExtractorState& state,
35
35
}
36
36
}
37
37
38
- static void processFrontendOptions (swift::FrontendOptions& options) {
38
+ static void processFrontendOptions (codeql::SwiftExtractorState& state,
39
+ swift::FrontendOptions& options) {
39
40
auto & inOuts = options.InputsAndOutputs ;
40
41
std::vector<swift::InputFile> inputs;
41
42
inOuts.forEachInput ([&](const swift::InputFile& input) {
@@ -53,6 +54,7 @@ static void processFrontendOptions(swift::FrontendOptions& options) {
53
54
input.getPrimarySpecificPaths ().SupplementaryOutputs .ModuleOutputPath ;
54
55
!module .empty ()) {
55
56
psp.SupplementaryOutputs .ModuleOutputPath = codeql::redirect (module );
57
+ state.originalOutputModules .push_back (module );
56
58
}
57
59
auto inputCopy = input;
58
60
inputCopy.setPrimarySpecificPaths (std::move (psp));
@@ -77,7 +79,7 @@ class Observer : public swift::FrontendObserver {
77
79
void parsedArgs (swift::CompilerInvocation& invocation) override {
78
80
auto & options = invocation.getFrontendOptions ();
79
81
lockOutputSwiftModuleTraps (state, options);
80
- processFrontendOptions (options);
82
+ processFrontendOptions (state, options);
81
83
}
82
84
83
85
void configuredCompiler (swift::CompilerInstance& instance) override {
You can’t perform that action at this time.
0 commit comments