bnbarham accepted this revision. bnbarham added a comment. This revision is now accepted and ready to land.
Few small comments, LGTM otherwise. ================ Comment at: clang/include/clang/Lex/HeaderSearch.h:627 /// Try to find a module map file in the given directory, returning /// \c nullptr if none is found. + Optional<FileEntryRef> lookupModuleMapFile(const DirectoryEntry *Dir, ---------------- ================ Comment at: clang/lib/Frontend/FrontendAction.cpp:444 FileID ModuleMapID = SrcMgr.getMainFileID(); - const FileEntry *ModuleMap = SrcMgr.getFileEntryForID(ModuleMapID); + Optional<FileEntryRef> ModuleMap = SrcMgr.getFileEntryRefForID(ModuleMapID); ---------------- The empty case isn't checked as far as I can tell. The null case wasn't either, but seems like we should just `return true`? ================ Comment at: clang/lib/Lex/HeaderSearch.cpp:1713 + if (auto F = FileMgr.getOptionalFileRef(ModuleMapFileName)) return *F; ---------------- Nitpick: could just return `F` directly in the 3 ifs here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127647/new/ https://reviews.llvm.org/D127647 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits