@@ -187,8 +187,8 @@ GetAffectingModuleMaps(const Preprocessor &PP, Module *RootModule) {
187
187
continue ;
188
188
189
189
const HeaderFileInfo *HFI = HS.getExistingLocalFileInfo (*File);
190
- if (!HFI || (HFI-> isModuleHeader && !HFI->isCompilingModuleHeader ) ||
191
- (HFI->isTextualModuleHeader && !PP.alreadyIncluded (*File)))
190
+ if (!HFI || (!HFI->isCompilingModuleHeader &&
191
+ (HFI->isModuleHeader || !PP.alreadyIncluded (*File) )))
192
192
continue ;
193
193
194
194
for (const auto &KH : HS.findResolvedModulesForHeader (*File)) {
@@ -238,8 +238,6 @@ GetAffectingModuleMaps(const Preprocessor &PP, Module *RootModule) {
238
238
CollectIncludingMapsFromAncestors (CurrentModule);
239
239
for (const Module *ImportedModule : CurrentModule->Imports )
240
240
CollectIncludingMapsFromAncestors (ImportedModule);
241
- for (const Module *UsedModule : CurrentModule->DirectUses )
242
- CollectIncludingMapsFromAncestors (UsedModule);
243
241
for (const Module *UndeclaredModule : CurrentModule->UndeclaredUses )
244
242
CollectIncludingMapsFromAncestors (UndeclaredModule);
245
243
}
@@ -2061,11 +2059,11 @@ void ASTWriter::WriteHeaderSearch(const HeaderSearch &HS) {
2061
2059
// changed since it was loaded. Also skip it if it's for a modular header
2062
2060
// from a different module; in that case, we rely on the module(s)
2063
2061
// containing the header to provide this information. Also skip it if it's
2064
- // for a textual header from a different module that has not been included;
2065
- // in that case, we don't need the information at all.
2062
+ // for any header not from this module that has not been included; in that
2063
+ // case, we don't need the information at all.
2066
2064
const HeaderFileInfo *HFI = HS.getExistingLocalFileInfo (*File);
2067
- if (!HFI || (HFI-> isModuleHeader && !HFI->isCompilingModuleHeader ) ||
2068
- (HFI->isTextualModuleHeader && !PP->alreadyIncluded (*File)))
2065
+ if (!HFI || (!HFI->isCompilingModuleHeader &&
2066
+ (HFI->isModuleHeader || !PP->alreadyIncluded (*File) )))
2069
2067
continue ;
2070
2068
2071
2069
// Massage the file path into an appropriate form.
0 commit comments