[PATCH] D135381: [clang][modules] Fix handling of `ModuleHeaderRole::ExcludedHeader`
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 6 11:21:24 PDT 2022
jansvoboda11 created this revision.
jansvoboda11 added reviewers: Bigcheese, rsmith.
Herald added a subscriber: ributzka.
Herald added a project: All.
jansvoboda11 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This is a follow-up to D134224 <https://reviews.llvm.org/D134224>. The original patch added new `ExcludedHeader` enumerator to `ModuleMap::ModuleHeaderRole` and started associating headers with the modules they were excluded from. This was necessary to consider their module maps as "affecting" in certain situations and in turn serialize them into the PCM.
The association of the header and module needs to be handled when deserializing the PCM as well, though. This patch fixes a potential assertion failure and a regression. This essentially reverts parts of feb54b6ded123f8118fdc20620d3f657dfeab485.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D135381
Files:
clang/include/clang/Lex/ModuleMap.h
clang/lib/Lex/HeaderSearch.cpp
clang/lib/Lex/ModuleMap.cpp
clang/lib/Lex/PPDirectives.cpp
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/test/Modules/exclude-header-fw-umbrella.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135381.465802.patch
Type: text/x-patch
Size: 9720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221006/f271a4f8/attachment.bin>
More information about the cfe-commits
mailing list