aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/libclang/LibclangTest.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2024-04-24 09:05:56 -0700
committerGitHub <noreply@github.com>2024-04-24 09:05:56 -0700
commitd609029d6c9aae84b52238f39c35200316bdbb93 (patch)
tree318ad2fa98dc90bdc77deefc9118db74f353c4ba /clang/unittests/libclang/LibclangTest.cpp
parentb10e4b82e624af870c2a03ce0c5515148136e287 (diff)
downloadllvm-d609029d6c9aae84b52238f39c35200316bdbb93.zip
llvm-d609029d6c9aae84b52238f39c35200316bdbb93.tar.gz
llvm-d609029d6c9aae84b52238f39c35200316bdbb93.tar.bz2
[clang][modules] Allow module maps with textual headers to be non-affecting (#89441)
When writing out a PCM, we skip serializing headers' `HeaderFileInfo` struct whenever this condition evaluates to `true`: ```c++ !HFI || (HFI->isModuleHeader && !HFI->isCompilingModuleHeader) ``` However, when Clang parses a module map file, each textual header gets a `HFI` with `isModuleHeader=false`, `isTextualModuleHeader=true` and `isCompilingModuleHeader=false`. This means the condition evaluates to `false` even if the header was never included and the module map did not affect the compilation. Each PCM file that happened to parse such module map then contains a copy of the `HeaderFileInfo` struct for all textual headers, and considers the containing module map affecting. This patch makes it so that we skip headers that have not been included, essentially removing the virality of textual headers when it comes to PCM serialization.
Diffstat (limited to 'clang/unittests/libclang/LibclangTest.cpp')
0 files changed, 0 insertions, 0 deletions