Home | History | Annotate | Download | only in Basic

Lines Matching defs:Module

1 //===--- Module.cpp - Describe a module -----------------------------------===//
10 // This file defines the Module class, which describes a module in the source
14 #include "clang/Basic/Module.h"
25 Module::Module(StringRef Name, SourceLocation DefinitionLoc, Module *Parent,
45 Module::~Module() {
69 Module::isAvailable(const LangOptions &LangOpts, const TargetInfo &Target,
74 for (const Module *Current = this; Current; Current = Current->Parent) {
83 llvm_unreachable("could not find a reason why module is unavailable");
86 bool Module::isSubModuleOf(Module *Other) const {
87 const Module *This = this;
98 const Module *Module::getTopLevelModule() const {
99 const Module *Result = this;
106 std::string Module::getFullModuleName() const {
109 // Build up the set of module names (from innermost to outermost).
110 for (const Module *M = this; M; M = M->Parent)
126 const DirectoryEntry *Module::getUmbrellaDir() const {
133 ArrayRef<const FileEntry *> Module::getTopHeaders(FileManager &FileMgr) {
146 void Module::addRequirement(StringRef Feature, const LangOptions &LangOpts,
157 SmallVector<Module *, 2> Stack;
160 Module *Current = Stack.back();
176 Module *Module::findSubmodule(StringRef Name) const {
192 void Module::getExportedModules(SmallVectorImpl<Module *> &Exported) const {
195 SmallVector<Module *, 4> WildcardRestrictions;
197 Module *Mod = Exports[I].getPointer();
199 // Export a named module directly; no wildcards involved.
211 if (Module *Restriction = Exports[I].getPointer())
225 Module *Mod = Imports[I];
228 // Check whether this module meets one of the restrictions.
230 Module *Restriction = WildcardRestrictions[R];
245 void Module::buildVisibleModulesCache() const {
248 // This module is visible to itself.
251 llvm::SmallVector<Module*, 4> Exported;
253 // Every imported module is visible.
256 // Every module exported by an imported module is visible.
263 void Module::print(raw_ostream &OS, unsigned Indent) const {
269 OS << "module " << Name;
342 if (Module *Restriction = Exports[I].getPointer()) {
397 OS << "module * {\n";
410 void Module::dump() const {