[PATCH] D142724: [clang] use FileEntryRef for SUBMODULE_TOPHEADER
Richard Howell via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 27 10:07:59 PST 2023
rmaz marked an inline comment as done.
rmaz added inline comments.
================
Comment at: clang/lib/Lex/ModuleMap.cpp:663
Result->IsInferred = true;
- Result->addTopHeader(File);
+ Result->addTopHeader(File->getLastRef());
----------------
jansvoboda11 wrote:
> How much work would be to refactor `File` to be `FileEntryRef`? Would be good if we didn't need to resort to `getLastRef()`.
It is unfortunately a fair bit. I spent some time on it but hit a roadblock with the FileManagers VirtualFileEntries:
https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Basic/FileManager.h#L70-L71
We would require this to be refactored to FileEntry too, as it is used here to provide a UID mapping to FileEntry pointers which needs to be changed to refs:
https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/FileManager.cpp#L614-L633
I can put up a follow on diff once this one is shipped if preferred?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142724/new/
https://reviews.llvm.org/D142724
More information about the cfe-commits
mailing list