dexonsmith added a comment. In D97850#2629464 <https://reviews.llvm.org/D97850#2629464>, @ilyakuteev wrote:
> If a fix will be in ModuleManager and only for ModuleCache the problem with > symlinks and path will not affect it as ModuleCache is managed by clang and > we can rely on it. > I agree that using `FileMgr.getBypassFile` is not the best way to solve this > problem, we need to replace `FileMgr.getFileRef` with some other method but I > did not found such method in FileManager. Maybe we need to add one or not use > FileManager as was mentioned. Not sure which way is better and safer. FileManager plays two roles (unless I'm missing a third?): - Establish an identity for multiple paths that should be treated as "the same" (address of FileEntry). - Cache stat information (the content of FileEntry). This patch is predicated on it being safe to skip the former (makes sense to me, although I think clang is a bit inconsistent about using relative paths for the module cache, so there might be some work to do). We already skip / avoid the latter (ModuleManager is the only caller of FileManager::getNoncachedStatValue). Seems like skipping the FileManager will simplify both the ModuleManager and the FileManager. Might be worth an RFC on cfe-dev? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97850/new/ https://reviews.llvm.org/D97850 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits