File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -56,8 +56,10 @@ static std::string getFilename(swift::ModuleDecl& module, swift::SourceFile* pri
56
56
}
57
57
// PCM clang module
58
58
if (module .isNonSwiftModule ()) {
59
- // Several modules with different name might come from .pcm (clang module) files
59
+ // Several modules with different names might come from .pcm (clang module) files
60
60
// In this case we want to differentiate them
61
+ // Moreover, pcm files may come from caches located in different directories, but are
62
+ // unambiguously identified by the base file name, so we can discard the absolute directory
61
63
std::string filename = " /pcms/" s + llvm::sys::path::filename (module .getModuleFilename ()).str ();
62
64
filename += " -" ;
63
65
filename += module .getName ().str ();
@@ -175,9 +177,8 @@ void codeql::extractSwiftFiles(const SwiftExtractorConfiguration& config,
175
177
// extracted from source with more information. We do this by creating empty trap files.
176
178
// TargetFile semantics will ensure any following run trying to extract that swiftmodule will just
177
179
// skip doing it
178
- auto outputModuleTrapSuffix = " -" + compiler.getMainModule ()->getName ().str ().str () + " .trap" ;
179
180
for (const auto & output : config.outputSwiftModules ) {
180
- TargetFile::create (output + outputModuleTrapSuffix , config.trapDir , config.getTempTrapDir ());
181
+ TargetFile::create (output, config.trapDir , config.getTempTrapDir ());
181
182
}
182
183
for (auto & module : modules) {
183
184
bool isFromSourceFile = false ;
You can’t perform that action at this time.
0 commit comments