bnbarham accepted this revision.
bnbarham added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Frontend/FrontendAction.cpp:811
       // Relative searches begin from CWD.
-      const DirectoryEntry *Dir = nullptr;
-      if (auto DirOrErr = CI.getFileManager().getDirectory("."))
-        Dir = *DirOrErr;
-      SmallVector<std::pair<const FileEntry *, const DirectoryEntry *>, 1> CWD;
-      CWD.push_back({nullptr, Dir});
+      auto Dir = CI.getFileManager().getOptionalDirectoryRef(".");
+      SmallVector<std::pair<const FileEntry *, DirectoryEntryRef>, 1> CWD;
----------------
Worth adding an assert here? It'd be nice to cleanup the CWD handling in 
FileManager at some point.


================
Comment at: clang/lib/Lex/PPDirectives.cpp:891
   // stack, record the parent #includes.
-  SmallVector<std::pair<const FileEntry *, const DirectoryEntry *>, 16>
-      Includers;
+  SmallVector<std::pair<const FileEntry *, DirectoryEntryRef>, 16> Includers;
   bool BuildSystemModule = false;
----------------
Could we change this to a FileEntryRef as well, or would you prefer to do that 
later? It'll touch basically all the same places again (eg. each parameter 
above).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127663/new/

https://reviews.llvm.org/D127663

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to