[PATCH] D127660: [clang][lex] NFCI: Use DirectoryEntryRef in Preprocessor::MainFileDir

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 25 14:47:32 PDT 2023


jansvoboda11 marked an inline comment as done.
jansvoboda11 added inline comments.
Herald added a subscriber: ributzka.


================
Comment at: clang/lib/Frontend/FrontendAction.cpp:507
   // be resolved relative to the build directory of the module map file.
-  CI.getPreprocessor().setMainFileDir(M->Directory);
+  CI.getPreprocessor().setMainFileDir(*M->Directory);
 
----------------
bnbarham wrote:
> Same as in previous review, is this guaranteed to be set? Might be worth a comment on the field itself if so (in https://reviews.llvm.org/D127654)
It is. Couple lines above we call `HeaderSearch::lookupModule()`, which parses the defining module map and sets the `Directory`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127660



More information about the cfe-commits mailing list