[PATCH] D142724: [clang] use FileEntryRef for SUBMODULE_TOPHEADER
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 27 09:16:52 PST 2023
jansvoboda11 added inline comments.
================
Comment at: clang/lib/Basic/Module.cpp:273
+void Module::addTopHeader(OptionalFileEntryRef File) {
assert(File);
+ TopHeaders.insert(*File);
----------------
If we assert that `File` is not empty right away, why take `OptionalFileEntryRef` instead of `FileEntryRef`?
================
Comment at: clang/lib/Lex/ModuleMap.cpp:663
Result->IsInferred = true;
- Result->addTopHeader(File);
+ Result->addTopHeader(File->getLastRef());
----------------
How much work would be to refactor `File` to be `FileEntryRef`? Would be good if we didn't need to resort to `getLastRef()`.
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