Lines Matching refs:Module
112 std::string HeaderSearch::getModuleFileName(Module *Module) {
113 // If we don't have a module cache path, we can't do anything.
119 llvm::sys::path::append(Result, Module->getTopLevelModule()->Name + ".pcm");
124 // If we don't have a module cache path, we can't do anything.
134 Module *HeaderSearch::lookupModule(StringRef ModuleName, bool AllowSearch) {
135 // Look in the module map to determine if there is a module by this name.
136 Module *Module = ModMap.findModule(ModuleName);
137 if (Module || !AllowSearch)
138 return Module;
140 // Look through the various header search paths to load any available module
141 // maps, searching for a module map that describes this module.
144 // Search for or infer a module map for a framework.
152 Module = loadFrameworkModule(ModuleName, FrameworkDir, IsSystem);
153 if (Module)
158 // FIXME: Figure out how header maps and module maps will work together.
165 // Search for a module map file in this directory.
168 // We just loaded a module map file; check whether the module is
170 Module = ModMap.findModule(ModuleName);
171 if (Module)
175 // Search for a module map in a subdirectory with the same name as the
176 // module.
181 // If we just loaded a module map file, look for the module again.
182 Module = ModMap.findModule(ModuleName);
183 if (Module)
187 // If we've already performed the exhaustive search for module maps in this
192 // Load all module maps in the immediate subdirectories of this search
196 // Look again for the module.
197 Module = ModMap.findModule(ModuleName);
198 if (Module)
202 return Module;
247 // If we have a module map that might map this header, load it and
248 // check whether we'll have a suggestion for a module.
256 // If there is a module that corresponds to this header,
291 /// returned top-level module to the originally named framework.
433 // If we found the header and are allowed to suggest a module, do so now.
466 // Load this framework module. If that succeeds, find the suggested module
772 // If we're supposed to suggest a module, look for one now.
783 // Load this framework module. If that succeeds, find the suggested module
949 // Try to load the module map file in this directory.
953 // Success. All of the directories we stepped through inherit this module
970 // having module maps if we eventually do find a module map.
979 // which includes whether the file is part of a module.
994 if (!Result && llvm::sys::path::filename(File->getName()) == "module.map") {
995 // If the file we loaded was a module.map, look for the corresponding
1007 Module *HeaderSearch::loadFrameworkModule(StringRef Name,
1010 if (Module *Module = ModMap.findModule(Name))
1011 return Module;
1013 // Try to load a module map file.
1034 // Try to infer a module map from the top-level framework directory.
1035 Module *Result = ModMap.inferFrameworkModule(SubmodulePath.back(),
1042 // Follow the submodule path to find the requested (sub)framework module
1043 // within the top-level framework module.
1071 llvm::sys::path::append(ModuleMapFileName, "module.map");
1073 // We have found a module map file. Try to parse it.
1075 // No suitable module map.
1080 // This directory has a module map.
1083 // Check whether there is a private module map that we need to load as well.
1090 // No suitable module map.
1099 // No suitable module map.
1104 void HeaderSearch::collectAllModules(SmallVectorImpl<Module *> &Modules) {
1107 // Load module maps for each of the header search directories.
1126 // Load this framework module.
1137 // Try to load a module map file for the search directory.
1140 // Try to load module map files for immediate subdirectories of this search
1154 // Load module maps for each of the header search directories.
1162 // Try to load a module map file for the search directory.