From 2e1ec4c737f93925e29e4037e758b940c6fef448 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Tue, 30 May 2023 22:58:49 -0700 Subject: [clang] NFCI: Split `HeaderSearch::findAllModulesForHeader()` This mimics the `ModuleMap` API and enables D151854, where the `AllowCreation = true` function needs `FileEntryRef` but `AllowCreation = false` functions is happy with plain `FileEntry`. No functional change intended. Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D151853 --- clang/lib/Lex/ModuleMap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/Lex/ModuleMap.cpp') diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index 93f770f..7fc810f 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -684,12 +684,12 @@ ModuleMap::findOrCreateModuleForHeaderInUmbrellaDir(const FileEntry *File) { } ArrayRef -ModuleMap::findAllModulesForHeader(const FileEntry *File, bool AllowCreation) { +ModuleMap::findAllModulesForHeader(const FileEntry *File) { HeadersMap::iterator Known = findKnownHeader(File); if (Known != Headers.end()) return Known->second; - if (AllowCreation && findOrCreateModuleForHeaderInUmbrellaDir(File)) + if (findOrCreateModuleForHeaderInUmbrellaDir(File)) return Headers.find(File)->second; return std::nullopt; -- cgit v1.1