Lines Matching refs:Module

39 Module::ExportDecl 
40 ModuleMap::resolveExport(Module *Mod, in resolveExport()
41 const Module::UnresolvedExportDecl &Unresolved, in resolveExport()
46 return Module::ExportDecl(nullptr, true); in resolveExport()
50 Module *Context = resolveModuleId(Unresolved.Id, Mod, Complain); in resolveExport()
52 return Module::ExportDecl(); in resolveExport()
54 return Module::ExportDecl(Context, Unresolved.Wildcard); in resolveExport()
57 Module *ModuleMap::resolveModuleId(const ModuleId &Id, Module *Mod, in resolveModuleId()
60 Module *Context = lookupModuleUnqualified(Id[0].first, Mod); in resolveModuleId()
71 Module *Sub = lookupModuleQualified(Id[I].first, Context); in resolveModuleId()
97 for (llvm::StringMap<Module *>::iterator I = Modules.begin(), in ~ModuleMap()
212 static bool violatesPrivateInclude(Module *RequestingModule, in violatesPrivateInclude()
215 Module *RequestedModule) { in violatesPrivateInclude()
223 SmallVectorImpl<Module::Header> *HeaderList[] = { in violatesPrivateInclude()
224 &RequestedModule->Headers[Module::HK_Private], in violatesPrivateInclude()
225 &RequestedModule->Headers[Module::HK_PrivateTextual]}; in violatesPrivateInclude()
228 std::find_if(Hs->begin(), Hs->end(), [&](const Module::Header &H) { in violatesPrivateInclude()
239 static Module *getTopLevelOrNull(Module *M) { in getTopLevelOrNull()
243 void ModuleMap::diagnoseHeaderInclusion(Module *RequestingModule, in diagnoseHeaderInclusion()
256 Module *Private = nullptr; in diagnoseHeaderInclusion()
257 Module *NotUsed = nullptr; in diagnoseHeaderInclusion()
365 Module *Result = H.getModule(); in findOrCreateModuleForHeaderInUmbrellaDir()
369 Module *UmbrellaModule = Result; in findOrCreateModuleForHeaderInUmbrellaDir()
398 Result->Exports.push_back(Module::ExportDecl(nullptr, true)); in findOrCreateModuleForHeaderInUmbrellaDir()
414 Result->Exports.push_back(Module::ExportDecl(nullptr, true)); in findOrCreateModuleForHeaderInUmbrellaDir()
444 const Module *RequestingModule) const { in isHeaderUnavailableInModule()
462 auto IsUnavailable = [&](const Module *M) { in isHeaderUnavailableInModule()
470 llvm::DenseMap<const DirectoryEntry *, Module *>::const_iterator KnownDir in isHeaderUnavailableInModule()
473 Module *Found = KnownDir->second; in isHeaderUnavailableInModule()
479 Module *UmbrellaModule = Found; in isHeaderUnavailableInModule()
524 Module *ModuleMap::findModule(StringRef Name) const { in findModule()
525 llvm::StringMap<Module *>::const_iterator Known = Modules.find(Name); in findModule()
532 Module *ModuleMap::lookupModuleUnqualified(StringRef Name, in lookupModuleUnqualified()
533 Module *Context) const { in lookupModuleUnqualified()
535 if (Module *Sub = lookupModuleQualified(Name, Context)) in lookupModuleUnqualified()
542 Module *ModuleMap::lookupModuleQualified(StringRef Name, Module *Context) const{ in lookupModuleQualified()
549 std::pair<Module *, bool>
550 ModuleMap::findOrCreateModule(StringRef Name, Module *Parent, bool IsFramework, in findOrCreateModule()
553 if (Module *Sub = lookupModuleQualified(Name, Parent)) in findOrCreateModule()
557 Module *Result = new Module(Name, SourceLocation(), Parent, in findOrCreateModule()
575 static void inferFrameworkLink(Module *Mod, const DirectoryEntry *FrameworkDir, in inferFrameworkLink()
592 Mod->LinkLibraries.push_back(Module::LinkLibrary(Mod->Name, in inferFrameworkLink()
599 Module *ModuleMap::inferFrameworkModule(const DirectoryEntry *FrameworkDir, in inferFrameworkModule()
600 bool IsSystem, Module *Parent) { in inferFrameworkModule()
606 Module *ModuleMap::inferFrameworkModule(const DirectoryEntry *FrameworkDir, in inferFrameworkModule()
607 Attributes Attrs, Module *Parent) { in inferFrameworkModule()
623 if (Module *Mod = lookupModuleQualified(ModuleName, Parent)) in inferFrameworkModule()
691 Module *Result = new Module(ModuleName, SourceLocation(), Parent, in inferFrameworkModule()
716 Result->Exports.push_back(Module::ExportDecl(nullptr, true)); in inferFrameworkModule()
771 void ModuleMap::setUmbrellaHeader(Module *Mod, const FileEntry *UmbrellaHeader, in setUmbrellaHeader()
779 void ModuleMap::setUmbrellaDir(Module *Mod, const DirectoryEntry *UmbrellaDir, in setUmbrellaDir()
786 static Module::HeaderKind headerRoleToKind(ModuleMap::ModuleHeaderRole Role) { in headerRoleToKind()
790 return Module::HK_Normal; in headerRoleToKind()
792 return Module::HK_Private; in headerRoleToKind()
794 return Module::HK_Textual; in headerRoleToKind()
796 return Module::HK_PrivateTextual; in headerRoleToKind()
800 void ModuleMap::addHeader(Module *Mod, Module::Header Header, in addHeader()
824 void ModuleMap::excludeHeader(Module *Mod, Module::Header Header) { in excludeHeader()
831 Mod->Headers[Module::HK_Excluded].push_back(std::move(Header)); in excludeHeader()
835 ModuleMap::getContainingModuleMapFile(const Module *Module) const { in getContainingModuleMapFile()
836 if (Module->DefinitionLoc.isInvalid()) in getContainingModuleMapFile()
840 SourceMgr.getFileID(Module->DefinitionLoc)); in getContainingModuleMapFile()
843 const FileEntry *ModuleMap::getModuleMapFileForUniquing(const Module *M) const { in getModuleMapFileForUniquing()
851 void ModuleMap::setInferredModuleAllowedBy(Module *M, const FileEntry *ModMap) { in setInferredModuleAllowedBy()
858 for (llvm::StringMap<Module *>::iterator M = Modules.begin(), in dump()
878 bool ModuleMap::resolveExports(Module *Mod, bool Complain) { in resolveExports()
882 Module::ExportDecl Export = resolveExport(Mod, UE, Complain); in resolveExports()
891 bool ModuleMap::resolveUses(Module *Mod, bool Complain) { in resolveUses()
895 Module *DirectUse = resolveModuleId(UDU, Mod, Complain); in resolveUses()
904 bool ModuleMap::resolveConflicts(Module *Mod, bool Complain) { in resolveConflicts()
908 if (Module *OtherMod = resolveModuleId(UC.Id, Mod, Complain)) { in resolveConflicts()
909 Module::Conflict Conflict; in resolveConflicts()
919 Module *ModuleMap::inferModuleFromLocation(FullSourceLoc Loc) { in inferModuleFromLocation()
934 if (Module *Mod = findModuleForHeader(ExpansionFile).getModule()) in inferModuleFromLocation()
1042 Module *ActiveModule;
1052 llvm::SmallPtrSet<Module *, 2> UsesRequiresExcludedHack;
1374 Module *PreviousActiveModule = ActiveModule; in parseModuleDecl()
1379 const Module *TopLevelModule = nullptr; in parseModuleDecl()
1381 if (Module *Next = Map.lookupModuleQualified(Id[I].first, ActiveModule)) { in parseModuleDecl()
1424 if (Module *Existing = Map.lookupModuleQualified(ModuleName, ActiveModule)) { in parseModuleDecl()
1623 static bool shouldAddRequirement(Module *M, StringRef Feature, in shouldAddRequirement()
1698 static void appendSubframeworkPaths(Module *Mod, in appendSubframeworkPaths()
1764 Module::UnresolvedHeaderDirective Header; in parseHeaderDecl()
1845 if (Module *UmbrellaModule = Map.UmbrellaDirs[UmbrellaDir]) { in parseHeaderDecl()
1854 Module::Header H = {RelativePathName.str(), File}; in parseHeaderDecl()
1864 Module::Header H = { BuiltinFile->getName(), BuiltinFile }; in parseHeaderDecl()
1869 Module::Header H = { RelativePathName.str(), File }; in parseHeaderDecl()
1883 static int compareModuleHeaders(const Module::Header *A, in compareModuleHeaders()
1884 const Module::Header *B) { in compareModuleHeaders()
1936 SmallVector<Module::Header, 6> Headers; in parseUmbrellaDirDecl()
1941 Module::Header Header = {I->path(), FE}; in parseUmbrellaDirDecl()
1954 if (Module *OwningModule = Map.UmbrellaDirs[Dir]) { in parseUmbrellaDirDecl()
2007 Module::UnresolvedExportDecl Unresolved = { in parseExportDecl()
2055 ActiveModule->LinkLibraries.push_back(Module::LinkLibrary(LibraryName, in parseLinkDecl()
2137 Module::UnresolvedConflict Conflict; in parseConflict()