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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits