================ @@ -4772,6 +4772,23 @@ bool ASTWriter::PreparePathForOutput(SmallVectorImpl<char> &Path) { Changed = true; } + // If we are generating a normal PCH (EG. not a C++ module). + if (!WritingModule) { + // Use the vfs overlay if it exists to translate paths. + auto &FileSys = + Context->getSourceManager().getFileManager().getVirtualFileSystem(); + + if (auto *RFS = dyn_cast<llvm::vfs::RedirectingFileSystem>(&FileSys)) { ---------------- sheredom wrote:
So tried this, and there are problems. `getRealPath` requires that the remapped path already exists, and so will fail (returning the original path again) because the remapped location doesn't exist (because we are wanting to remap to some fake directory!). https://github.com/llvm/llvm-project/pull/106577 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits