llvm/clang/lib/Basic/Module.cpp

//===- Module.cpp - Describe a module -------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file defines the Module class, which describes a module in the source
// code.
//
//===----------------------------------------------------------------------===//

#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) {}

/// Determine whether a translation unit built using the current
/// language options has the given 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 {}

// The -fmodule-name option tells the compiler to textually include headers in
// the specified module, meaning Clang won't build the specified module. This
// is useful in a number of situations, for instance, when building a library
// that vends a module map, one might want to avoid hitting intermediate build
// products containing the module map or avoid finding the system installed
// modulemap for that library.
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) {}