[PATCH] D142780: [clang] NFCI: Use FileEntryRef in FileManager's UID mapping

2023-02-06 Thread Richard Howell via Phabricator via cfe-commits
rmaz added a comment. In D142780#4087273 , @jansvoboda11 wrote: > Sounds like the easies way out is serializing all `FileEntryRef` objects we > know in deterministic order. How about something like https://reviews.llvm.org/D143414 ? Repository: rG

[PATCH] D142780: [clang] NFCI: Use FileEntryRef in FileManager's UID mapping

2023-01-27 Thread Richard Howell via Phabricator via cfe-commits
rmaz added a comment. In D142780#4087270 , @benlangmuir wrote: > If compiling a single pcm accesses multiple hard links with the same UID, > then it would not be possible to use the set of UIDs to get the "right path". > At best we could make it get

[PATCH] D142780: [clang] NFCI: Use FileEntryRef in FileManager's UID mapping

2023-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Sounds like the easies way out is serializing all `FileEntryRef` objects we know in deterministic order. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142780/new/ https://reviews.llvm.org/D142780

[PATCH] D142780: [clang] NFCI: Use FileEntryRef in FileManager's UID mapping

2023-01-27 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. In D142780#4087250 , @rmaz wrote: > In that case we are seeing non-deterministic header paths serialized in pcm > files. IIUC the header files are serialized based in their unique ID, so it > wouldn't be possible to handle

[PATCH] D142780: [clang] NFCI: Use FileEntryRef in FileManager's UID mapping

2023-01-27 Thread Richard Howell via Phabricator via cfe-commits
rmaz added a comment. In D142780#4087236 , @benlangmuir wrote: > I think if we want to change this to FileEntryRef it needs to be > deterministic which ref you get. I think this might be the root of the problem we are seeing: depending on build

[PATCH] D142780: [clang] NFCI: Use FileEntryRef in FileManager's UID mapping

2023-01-27 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. Iterating over `SeenFileEntries` and skipping `VirtualFileEntries` looks good to me. I'm not sure about changing this to FileEntryRef though. The way this API works you only get one per unique file, which is well suited to `FileEntry *` which has the same uniquing

[PATCH] D142780: [clang] NFCI: Use FileEntryRef in FileManager's UID mapping

2023-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: rmaz, benlangmuir, bnbarham. Herald added a subscriber: ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Per the