#include "clang/Basic/Module.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/TargetInfo.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <functional>
#include <string>
#include <utility>
#include <vector>
usingnamespaceclang;
Module::Module(StringRef Name, SourceLocation DefinitionLoc, Module *Parent,
bool IsFramework, bool IsExplicit, unsigned VisibilityID)
: … { … }
Module::~Module() { … }
static bool isPlatformEnvironment(const TargetInfo &Target, StringRef Feature) { … }
static bool hasFeature(StringRef Feature, const LangOptions &LangOpts,
const TargetInfo &Target) { … }
bool Module::isUnimportable(const LangOptions &LangOpts,
const TargetInfo &Target, Requirement &Req,
Module *&ShadowingModule) const { … }
bool Module::isForBuilding(const LangOptions &LangOpts) const { … }
bool Module::isAvailable(const LangOptions &LangOpts, const TargetInfo &Target,
Requirement &Req,
UnresolvedHeaderDirective &MissingHeader,
Module *&ShadowingModule) const { … }
bool Module::isSubModuleOf(const Module *Other) const { … }
const Module *Module::getTopLevelModule() const { … }
static StringRef getModuleNameFromComponent(
const std::pair<std::string, SourceLocation> &IdComponent) { … }
static StringRef getModuleNameFromComponent(StringRef R) { … }
template<typename InputIter>
static void printModuleId(raw_ostream &OS, InputIter Begin, InputIter End,
bool AllowStringLiterals = true) { … }
template<typename Container>
static void printModuleId(raw_ostream &OS, const Container &C) { … }
std::string Module::getFullModuleName(bool AllowStringLiterals) const { … }
bool Module::fullModuleNameIs(ArrayRef<StringRef> nameParts) const { … }
OptionalDirectoryEntryRef Module::getEffectiveUmbrellaDir() const { … }
void Module::addTopHeader(FileEntryRef File) { … }
ArrayRef<FileEntryRef> Module::getTopHeaders(FileManager &FileMgr) { … }
bool Module::directlyUses(const Module *Requested) { … }
void Module::addRequirement(StringRef Feature, bool RequiredState,
const LangOptions &LangOpts,
const TargetInfo &Target) { … }
void Module::markUnavailable(bool Unimportable) { … }
Module *Module::findSubmodule(StringRef Name) const { … }
Module *Module::findOrInferSubmodule(StringRef Name) { … }
Module *Module::getGlobalModuleFragment() const { … }
Module *Module::getPrivateModuleFragment() const { … }
void Module::getExportedModules(SmallVectorImpl<Module *> &Exported) const { … }
void Module::buildVisibleModulesCache() const { … }
void Module::print(raw_ostream &OS, unsigned Indent, bool Dump) const { … }
LLVM_DUMP_METHOD void Module::dump() const { … }
void VisibleModuleSet::setVisible(Module *M, SourceLocation Loc,
VisibleCallback Vis, ConflictCallback Cb) { … }