Lines Matching defs:Header
145 /// header, supplied by Clang to replace, override, or augment existing system
186 // an umbrella header.
218 // Check for consistency between the module header role
255 for (const KnownHeader &Header : Known->second) {
257 if (Header.getRole() == ModuleMap::ExcludedHeader) {
263 if (Header.getModule() == RequestingModule)
267 if (violatesPrivateInclude(RequestingModule, File, Header.getRole(),
268 Header.getModule())) {
269 Private = Header.getModule();
276 !directlyUses(RequestingModule, Header.getModule())) {
277 NotUsed = Header.getModule();
286 // We have found a header, but it is private.
328 // Cannot use a module if the header is excluded in it.
348 // If 'File' is a public header of this module, this is as good as we
350 // FIXME: If we have a RequestingModule, we should prefer the header from
371 // the directory of the umbrella header and the directory where
372 // the actual header is located.
393 // Infer a submodule with the same name as this header file.
408 // the module we found, since the umbrella header covers them all.
415 // If a header corresponds to an unavailable module, don't report
426 bool ModuleMap::isHeaderInUnavailableModule(const FileEntry *Header) const {
427 return isHeaderUnavailableInModule(Header, nullptr);
431 ModuleMap::isHeaderUnavailableInModule(const FileEntry *Header,
433 HeadersMap::const_iterator Known = Headers.find(Header);
446 const DirectoryEntry *Dir = Header->getDir();
456 // an umbrella header.
485 // Infer a submodule with the same name as this header file.
488 llvm::sys::path::stem(Header->getName()),
673 // Look for an umbrella header.
678 // FIXME: If there's no umbrella header, we could probably scan the
696 // umbrella header "umbrella-header-name"
772 void ModuleMap::addHeader(Module *Mod, const FileEntry *Header,
775 Mod->ExcludedHeaders.push_back(Header);
778 Mod->PrivateHeaders.push_back(Header);
780 Mod->NormalHeaders.push_back(Header);
782 HeaderInfo.MarkFileModuleHeader(Header, Role, isCompilingModuleHeader);
784 Headers[Header].push_back(KnownHeader(Mod, Role));
879 // Find the module that owns this header (if any).
883 // No module owns this header, so look up the inclusion chain to see if
884 // any included header has an associated module.
987 /// \brief Whether this module map is in a system header directory.
1069 .Case("header", MMToken::HeaderKeyword)
1250 /// header-declaration
1620 /// \brief Parse a header declaration.
1622 /// header-declaration:
1623 /// 'umbrella'[opt] 'header' string-literal
1624 /// 'exclude'[opt] 'header' string-literal
1630 // Parse the header name.
1633 << "header";
1637 Module::HeaderDirective Header;
1638 Header.FileName = Tok.getString();
1639 Header.FileNameLoc = consumeToken();
1643 Diags.Report(Header.FileNameLoc, diag::err_mmap_umbrella_clash)
1653 if (llvm::sys::path::is_absolute(Header.FileName)) {
1654 PathName = Header.FileName;
1657 // Search for the header file within the search directory.
1665 llvm::sys::path::append(PathName, "Headers", Header.FileName);
1671 llvm::sys::path::append(PathName, "PrivateHeaders", Header.FileName);
1676 llvm::sys::path::append(PathName, Header.FileName);
1679 // If this is a system module with a top-level header, this header
1681 // supplied by Clang. Find that builtin header.
1684 isBuiltinHeader(Header.FileName)) {
1686 llvm::sys::path::append(BuiltinPathName, Header.FileName);
1689 // If Clang supplies this header but the underlying system does not,
1710 // Record this umbrella header.
1714 // Record this header.
1730 // Ignore excluded header files. They're optional anyway.
1732 // If we find a module that has a missing header, we mark this module as
1733 // unavailable and store the header directive for displaying diagnostics.
1734 Header.IsUmbrella = LeadingToken == MMToken::UmbrellaKeyword;
1736 ActiveModule->MissingHeaders.push_back(Header);