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(ModuleConstructorTag, StringRef Name,
38 SourceLocation DefinitionLoc, Module *Parent, bool IsFramework,
61 Module::~Module() = default;
127 bool Module::isUnimportable(const LangOptions &LangOpts,
129 Module *&ShadowingModule) const {
133 for (const Module *Current = this; Current; Current = Current->Parent) {
156 bool Module::isForBuilding(const LangOptions &LangOpts) const {
172 bool Module::isAvailable(const LangOptions &LangOpts, const TargetInfo &Target,
175 Module *&ShadowingModule) const {
184 for (const Module *Current = this; Current; Current = Current->Parent) {
194 bool Module::isSubModuleOf(const Module *Other) const {
202 const Module *Module::getTopLevelModule() const {
203 const Module *Result = this;
240 std::string Module::getFullModuleName(bool AllowStringLiterals) const {
244 for (const Module *M = this; M; M = M->Parent)
255 bool Module::fullModuleNameIs(ArrayRef<StringRef> nameParts) const {
256 for (const Module *M = this; M; M = M->Parent) {
264 OptionalDirectoryEntryRef Module::getEffectiveUmbrellaDir() const {
272 void Module::addTopHeader(FileEntryRef File) {
277 ArrayRef<FileEntryRef> Module::getTopHeaders(FileManager &FileMgr) {
288 bool Module::directlyUses(const Module *Requested) {
314 void Module::addRequirement(StringRef Feature, bool RequiredState,
326 void Module::markUnavailable(bool Unimportable) {
327 auto needUpdate = [Unimportable](Module *M) {
334 SmallVector<Module *, 2> Stack;
337 Module *Current = Stack.back();
352 Module *Module::findSubmodule(StringRef Name) const {
363 Module *Module::getGlobalModuleFragment() const {
374 Module *Module::getPrivateModuleFragment() const {
385 void Module::getExportedModules(SmallVectorImpl<Module *> &Exported) const {
387 for (std::vector<Module *>::const_iterator I = SubModules.begin(),
390 Module *Mod = *I;
398 SmallVector<Module *, 4> WildcardRestrictions;
400 Module *Mod = Exports[I].getPointer();
414 if (Module *Restriction = Exports[I].getPointer())
428 Module *Mod = Imports[I];
433 Module *Restriction = WildcardRestrictions[R];
448 void Module::buildVisibleModulesCache() const {
455 SmallVector<Module *, 16> Stack(Imports.begin(), Imports.end());
457 Module *CurrModule = Stack.pop_back_val();
465 void Module::print(raw_ostream &OS, unsigned Indent, bool Dump) const {
575 if (Module *Restriction = Exports[I].getPointer()) {
595 for (Module *M : Imports) {
660 LLVM_DUMP_METHOD void Module::dump() const {
664 void VisibleModuleSet::setVisible(Module *M, SourceLocation Loc,
675 Module *M;
691 SmallVector<Module *, 16> Exports;
693 for (Module *E : Exports) {
701 llvm::SmallVector<Module*, 8> Path;