[PATCH] D143414: [clang] refactor FileManager::GetUniqueIDMapping

Richard Howell via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 8 06:14:19 PST 2023


rmaz added a comment.

In D143414#4110461 <https://reviews.llvm.org/D143414#4110461>, @benlangmuir wrote:

>> This should allow the path serialization of input files to use the paths used when looking up a file entry, instead of the last reference.
>
> Isn't this at odds with not having the VFS-mapped paths?
>
> It's not obvious to me why we want these specific semantics.  Elsewhere we have tried to preserve the virtual paths as well as the vfsoverlay files needed to interpret them.  Is there a reason the current approach is better? I feel like there may be context here I'm lacking

My understanding for why we were dropping the virtual paths is that we would already have the on-disk path entries anyway, but @jansvoboda11 may know more.

The reason for the change from FileEntry to FileEntryRef is so we can produce deterministic pcm output regardless of if the files are regular files or hard links pointing to the same inode. Currently this can result in varying paths and numbers of inputs being serialized.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143414/new/

https://reviews.llvm.org/D143414



More information about the cfe-commits mailing list