Lines Matching refs:Module

1 //===- Module.cpp - Describe a module -------------------------------------===//
9 // This file defines the Module class, which describes a module in the source
14 #include "clang/Basic/Module.h"
37 Module::Module(StringRef Name, SourceLocation DefinitionLoc, Module *Parent,
61 Module::~Module() {
131 bool Module::isUnimportable(const LangOptions &LangOpts,
133 Module *&ShadowingModule) const {
137 for (const Module *Current = this; Current; Current = Current->Parent) {
160 bool Module::isForBuilding(const LangOptions &LangOpts) const {
176 bool Module::isAvailable(const LangOptions &LangOpts, const TargetInfo &Target,
179 Module *&ShadowingModule) const {
188 for (const Module *Current = this; Current; Current = Current->Parent) {
198 bool Module::isSubModuleOf(const Module *Other) const {
206 const Module *Module::getTopLevelModule() const {
207 const Module *Result = this;
244 std::string Module::getFullModuleName(bool AllowStringLiterals) const {
248 for (const Module *M = this; M; M = M->Parent)
260 bool Module::fullModuleNameIs(ArrayRef<StringRef> nameParts) const {
261 for (const Module *M = this; M; M = M->Parent) {
269 OptionalDirectoryEntryRef Module::getEffectiveUmbrellaDir() const {
277 void Module::addTopHeader(FileEntryRef File) {
282 ArrayRef<FileEntryRef> Module::getTopHeaders(FileManager &FileMgr) {
293 bool Module::directlyUses(const Module *Requested) {
319 void Module::addRequirement(StringRef Feature, bool RequiredState,
331 void Module::markUnavailable(bool Unimportable) {
332 auto needUpdate = [Unimportable](Module *M) {
339 SmallVector<Module *, 2> Stack;
342 Module *Current = Stack.back();
357 Module *Module::findSubmodule(StringRef Name) const {
365 Module *Module::findOrInferSubmodule(StringRef Name) {
371 Module *Result = new Module(Name, SourceLocation(), this, false, InferExplicitSubmodules, 0);
376 Result->Exports.push_back(Module::ExportDecl(nullptr, true));
380 Module *Module::getGlobalModuleFragment() const {
391 Module *Module::getPrivateModuleFragment() const {
402 void Module::getExportedModules(SmallVectorImpl<Module *> &Exported) const {
404 for (std::vector<Module *>::const_iterator I = SubModules.begin(),
407 Module *Mod = *I;
415 SmallVector<Module *, 4> WildcardRestrictions;
417 Module *Mod = Exports[I].getPointer();
431 if (Module *Restriction = Exports[I].getPointer())
445 Module *Mod = Imports[I];
450 Module *Restriction = WildcardRestrictions[R];
465 void Module::buildVisibleModulesCache() const {
472 SmallVector<Module *, 16> Stack(Imports.begin(), Imports.end());
474 Module *CurrModule = Stack.pop_back_val();
482 void Module::print(raw_ostream &OS, unsigned Indent, bool Dump) const {
592 if (Module *Restriction = Exports[I].getPointer()) {
612 for (Module *M : Imports) {
677 LLVM_DUMP_METHOD void Module::dump() const {
681 void VisibleModuleSet::setVisible(Module *M, SourceLocation Loc,
692 Module *M;
708 SmallVector<Module *, 16> Exports;
710 for (Module *E : Exports) {
718 llvm::SmallVector<Module*, 8> Path;