aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/HeaderSearch.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2024-10-25 15:00:07 -0700
committerGitHub <noreply@github.com>2024-10-25 15:00:07 -0700
commit590b1e31546572b62040066f90a35893a1b64f29 (patch)
tree4845c82d1e9f22601474b984b6885646dfbe0788 /clang/lib/Lex/HeaderSearch.cpp
parenta93c952bab3569c84ae0f9619533f7d7c2477a41 (diff)
downloadllvm-590b1e31546572b62040066f90a35893a1b64f29.zip
llvm-590b1e31546572b62040066f90a35893a1b64f29.tar.gz
llvm-590b1e31546572b62040066f90a35893a1b64f29.tar.bz2
[clang][modules] Only serialize info for locally-included headers (#113718)
I noticed that some PCM files contain `HeaderFileInfo` for headers only included in a dependent PCM file, which is wasteful. This patch changes the logic to only write headers that are included locally. This makes the PCM files smaller and saves some superfluous deserialization of `HeaderFileInfo` triggered by `Preprocessor::alreadyIncluded()`.
Diffstat (limited to 'clang/lib/Lex/HeaderSearch.cpp')
-rw-r--r--clang/lib/Lex/HeaderSearch.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp
index 8826ab4..052be13 100644
--- a/clang/lib/Lex/HeaderSearch.cpp
+++ b/clang/lib/Lex/HeaderSearch.cpp
@@ -1582,7 +1582,6 @@ bool HeaderSearch::ShouldEnterIncludeFile(Preprocessor &PP,
}
}
- FileInfo.IsLocallyIncluded = true;
IsFirstIncludeOfFile = PP.markIncluded(File);
return true;
}