[PATCH] D57150: [HeaderSearch] don't immediately request that headers are opened in getFileAndSuggestModule().
Benjamin Kramer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 24 06:56:48 PST 2019
bkramer accepted this revision.
bkramer added inline comments.
================
Comment at: lib/Lex/HeaderSearch.cpp:313
// check whether we'll have a suggestion for a module.
- const FileEntry *File = getFileMgr().getFile(FileName, /*OpenFile=*/true);
+ const FileEntry *File = getFileMgr().getFile(FileName, /*OpenFile=*/false);
if (!File)
----------------
This deserves a comment that we don't open it because we might not need it. If we would use it the file would be closed after reading the contents.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57150/new/
https://reviews.llvm.org/D57150
More information about the cfe-commits
mailing list