[clang] Prevent creation of new submodules in ASTWriter
authorBen Langmuir <blangmuir@apple.com>
Mon, 8 May 2023 22:59:51 +0000 (15:59 -0700)
committerBen Langmuir <blangmuir@apple.com>
Tue, 9 May 2023 20:02:36 +0000 (13:02 -0700)
commit5984ea216d2acbe5613b0af06ea27ef395ca9904
tree2286c3de9542e6009d5923ffb017ef392ce04c0a
parentbb6a1eb003320cdfd4a5887ad2cd8577275c2f95
[clang] Prevent creation of new submodules in ASTWriter

Avoid inferring new submodules for headers in ASTWriter's collection of
affecting modulemap files, since we don't want to pick up dependencies
that didn't actually exist during parsing.

rdar://109112624

Differential Revision: https://reviews.llvm.org/D150151
clang/include/clang/Lex/HeaderSearch.h
clang/include/clang/Lex/ModuleMap.h
clang/lib/Lex/HeaderSearch.cpp
clang/lib/Lex/ModuleMap.cpp
clang/lib/Serialization/ASTWriter.cpp