clang 19.0.0git
Module.cpp File Reference
#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>

Go to the source code of this file.


static bool isPlatformEnvironment (const TargetInfo &Target, StringRef Feature)
static bool hasFeature (StringRef Feature, const LangOptions &LangOpts, const TargetInfo &Target)
 Determine whether a translation unit built using the current language options has the given feature.
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)

Function Documentation

◆ getModuleNameFromComponent() [1/2]

static StringRef getModuleNameFromComponent ( const std::pair< std::string, SourceLocation > &  IdComponent)

Definition at line 214 of file Module.cpp.

Referenced by printModuleId().

◆ getModuleNameFromComponent() [2/2]

static StringRef getModuleNameFromComponent ( StringRef  R)

Definition at line 219 of file Module.cpp.

◆ hasFeature()

static bool hasFeature ( StringRef  Feature,
const LangOptions LangOpts,
const TargetInfo Target 

◆ isPlatformEnvironment()

static bool isPlatformEnvironment ( const TargetInfo Target,
StringRef  Feature 

Definition at line 67 of file Module.cpp.

References Env.

Referenced by hasFeature().

◆ printModuleId() [1/2]

template<typename Container >
static void printModuleId ( raw_ostream &  OS,
const Container &  C 

Definition at line 240 of file Module.cpp.

References clang::C, and printModuleId().

◆ printModuleId() [2/2]

template<typename InputIter >
static void printModuleId ( raw_ostream &  OS,
InputIter  Begin,
InputIter  End,
bool  AllowStringLiterals = true