Home | History | Annotate | Download | only in Lex

Lines Matching refs:Module

11 // module as it relates to headers.
20 #include "clang/Basic/Module.h"
50 /// \brief Language options used to parse the module map itself.
55 // The module that we are building; related to \c LangOptions::CurrentModule.
56 Module *CompilingModule;
59 llvm::StringMap<Module *> Modules;
62 /// \brief Describes the role of a module header.
64 /// \brief This header is normally included in the module.
68 /// \brief This header is explicitly excluded from the module.
77 /// \brief A header that is known to reside within a given module,
80 llvm::PointerIntPair<Module *, 2, ModuleHeaderRole> Storage;
84 KnownHeader(Module *M, ModuleHeaderRole Role) : Storage(M, Role) { }
86 /// \brief Retrieve the module the header is stored in.
87 Module *getModule() const { return Storage.getPointer(); }
89 /// \brief The role of this header within the module.
92 /// \brief Whether this header is available in the module.
98 // associated module).
105 /// \brief Mapping from each header to the module that owns the contents of
109 /// \brief Mapping from directories with umbrella headers to the module
113 /// in the module map over to the module that includes them via its umbrella
115 llvm::DenseMap<const DirectoryEntry *, Module *> UmbrellaDirs;
136 /// \brief Describes whether we haved parsed a particular file as a module
145 /// \param Mod The module in which we're resolving the export declaration.
154 Module::ExportDecl
155 resolveExport(Module *Mod, const Module::UnresolvedExportDecl &Unresolved,
158 /// \brief Resolve the given module id to an actual module.
160 /// \param Id The module-id to resolve.
162 /// \param Mod The module in which we're resolving the module-id.
165 /// module-ids.
167 /// \returns The resolved module, or null if the module-id could not be
169 Module *resolveModuleId(const ModuleId &Id, Module *Mod, bool Complain) const;
172 /// \brief Construct a new module map.
174 /// \param FileMgr The file manager used to find module files and headers.
188 /// \brief Destroy the module map.
201 /// \brief Retrieve the module that owns the given header file, if any.
205 /// \returns The module KnownHeader, which provides the module that owns the
207 /// that no module owns this header file.
210 /// \brief Determine whether the given header is part of a module
214 /// \brief Retrieve a module with the given name.
216 /// \param Name The name of the module to look up.
218 /// \returns The named module, if known; otherwise, returns null.
219 Module *findModule(StringRef Name) const;
221 /// \brief Retrieve a module with the given name using lexical name lookup,
224 /// \param Name The name of the module to look up.
226 /// \param Context The module context, from which we will perform lexical
229 /// \returns The named module, if known; otherwise, returns null.
230 Module *lookupModuleUnqualified(StringRef Name, Module *Context) const;
232 /// \brief Retrieve a module with the given name within the given context,
235 /// \param Name The name of the module to look up.
237 /// \param Context The module for which we will look for a submodule. If
238 /// null, we will look for a top-level module.
241 Module *lookupModuleQualified(StringRef Name, Module *Context) const;
243 /// \brief Find a new module or submodule, or create it if it does not already
246 /// \param Name The name of the module to find or create.
248 /// \param Parent The module that will act as the parent of this submodule,
249 /// or NULL to indicate that this is a top-level module.
251 /// \param IsFramework Whether this is a framework module.
255 /// \returns The found or newly-created module, along with a boolean value
256 /// that will be true if the module is newly-created.
257 std::pair<Module *, bool> findOrCreateModule(StringRef Name, Module *Parent,
261 /// \brief Determine whether we can infer a framework module a framework
267 /// \param Name The name of the module.
269 /// \param IsSystem Will be set to 'true' if the inferred module must be a
270 /// system module.
272 /// \returns true if we are allowed to infer a framework module, and false
277 /// \brief Infer the contents of a framework module map from the given
279 Module *inferFrameworkModule(StringRef ModuleName,
281 bool IsSystem, Module *Parent);
283 /// \brief Retrieve the module map file containing the definition of the given
284 /// module.
286 /// \param Module The module whose module map file will be returned, if known.
288 /// \returns The file entry for the module map file containing the given
289 /// module, or NULL if the module definition was inferred.
290 const FileEntry *getContainingModuleMapFile(Module *Module) const;
292 /// \brief Resolve all of the unresolved exports in the given module.
294 /// \param Mod The module whose exports should be resolved.
300 bool resolveExports(Module *Mod, bool Complain);
302 /// \brief Resolve all of the unresolved conflicts in the given module.
304 /// \param Mod The module whose conflicts should be resolved.
310 bool resolveConflicts(Module *Mod, bool Complain);
312 /// \brief Infers the (sub)module based on the given source location and
318 /// \returns The module that owns this source location, or null if no
319 /// module owns this source location.
320 Module *inferModuleFromLocation(FullSourceLoc Loc);
322 /// \brief Sets the umbrella header of the given module to the given
324 void setUmbrellaHeader(Module *Mod, const FileEntry *UmbrellaHeader);
326 /// \brief Sets the umbrella directory of the given module to the given
328 void setUmbrellaDir(Module *Mod, const DirectoryEntry *UmbrellaDir);
330 /// \brief Adds this header to the given module.
331 /// \param Role The role of the header wrt the module.
332 void addHeader(Module *Mod, const FileEntry *Header,
335 /// \brief Parse the given module map file, and record any modules we
340 /// \param IsSystem Whether this module map file is in a system header
341 /// directory, and therefore should be considered a system module.
346 /// \brief Dump the contents of the module map, for debugging purposes.
349 typedef llvm::StringMap<Module *>::const_iterator module_iterator;