[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 23 18:22:01 PST 2024
================
@@ -1458,7 +1458,7 @@ bool HeaderSearch::ShouldEnterIncludeFile(Preprocessor &PP,
} else {
// Otherwise, if this is a #include of a file that was previously #import'd
// or if this is the second #include of a #pragma once file, ignore it.
- if ((FileInfo.isPragmaOnce || FileInfo.isImport) && !TryEnterImported())
----------------
ChuanqiXu9 wrote:
I feel it will become harder to read. So I didn't inline it. But I move the definition to a closer place.
https://github.com/llvm/llvm-project/pull/76119
More information about the cfe-commits
mailing list