mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add -prefix-serialized-debugging-options (#39555)
This commit adds a new frontend flag that applies debug path prefixing to the
paths serialized in swiftmodule files. This makes it possible to use swiftmodule
files that have been built on different machines by applying the inverse map
when debugging, in a similar fashion to source path prefixing.
The inverse mapping in LLDB will be handled in a follow up PR.
Second pass at #39138
Tests updated to handle windows path separators.
This reverts commit f5aa95b381.
This commit is contained in:
@@ -158,9 +158,11 @@ Status ModuleFile::associateWithFileContext(FileUnit *file, SourceLoc diagLoc,
|
||||
return error(status);
|
||||
}
|
||||
|
||||
for (const auto &searchPath : Core->SearchPaths)
|
||||
ctx.addSearchPath(searchPath.Path, searchPath.IsFramework,
|
||||
searchPath.IsSystem);
|
||||
for (const auto &searchPath : Core->SearchPaths) {
|
||||
ctx.addSearchPath(
|
||||
ctx.SearchPathOpts.SearchPathRemapper.remapPath(searchPath.Path),
|
||||
searchPath.IsFramework, searchPath.IsSystem);
|
||||
}
|
||||
|
||||
auto clangImporter = static_cast<ClangImporter *>(ctx.getClangModuleLoader());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user