[all-commits] [llvm/llvm-project] 786b50: [Clang][Lex] Extend HeaderSearch::LookupFile to co...
Jun Zhang via All-commits
all-commits at lists.llvm.org
Fri Aug 5 20:58:39 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 786b503f66b1a35f79312203fcb533ad27511982
https://github.com/llvm/llvm-project/commit/786b503f66b1a35f79312203fcb533ad27511982
Author: Jun Zhang <jun at junz.org>
Date: 2022-08-06 (Sat, 06 Aug 2022)
Changed paths:
M clang/include/clang/Lex/DirectoryLookup.h
M clang/include/clang/Lex/HeaderSearch.h
M clang/include/clang/Lex/Preprocessor.h
M clang/lib/Lex/HeaderSearch.cpp
M clang/lib/Lex/PPDirectives.cpp
Log Message:
-----------
[Clang][Lex] Extend HeaderSearch::LookupFile to control OpenFile behavior.
In the case of static compilation the file system is pretty much read-only
and taking a snapshot of it usually is sufficient. In the interactive C++
case the compilation is longer and people can create and include files, etc.
In that case we often do not want to open files or cache failures unless is
absolutely necessary.
This patch extends the original API call by forwarding some optional flags,
so we can continue use it in the previous way with no breakage.
Signed-off-by: Jun Zhang <jun at junz.org>
Differential Revision: https://reviews.llvm.org/D131241
More information about the All-commits
mailing list