clang  6.0.0svn
Classes | Public Member Functions | Public Attributes | List of all members
clang::HeaderSearchOptions Class Reference

HeaderSearchOptions - Helper class for storing options related to the initialization of the HeaderSearch object. More...

#include "clang/Lex/HeaderSearchOptions.h"

Collaboration diagram for clang::HeaderSearchOptions:
Collaboration graph
[legend]

Classes

struct  Entry
 
struct  SystemHeaderPrefix
 

Public Member Functions

 HeaderSearchOptions (StringRef _Sysroot="/")
 
void AddPath (StringRef Path, frontend::IncludeDirGroup Group, bool IsFramework, bool IgnoreSysRoot)
 AddPath - Add the Path path to the specified Group list. More...
 
void AddSystemHeaderPrefix (StringRef Prefix, bool IsSystemHeader)
 AddSystemHeaderPrefix - Override whether #include directives naming a path starting with Prefix should be considered as naming a system header. More...
 
void AddVFSOverlayFile (StringRef Name)
 
void AddPrebuiltModulePath (StringRef Name)
 

Public Attributes

std::string Sysroot
 If non-empty, the directory to use as a "virtual system root" for include paths. More...
 
std::vector< EntryUserEntries
 User specified include entries. More...
 
std::vector< SystemHeaderPrefixSystemHeaderPrefixes
 User-specified system header prefixes. More...
 
std::string ResourceDir
 The directory which holds the compiler resource files (builtin includes, etc.). More...
 
std::string ModuleCachePath
 The directory used for the module cache. More...
 
std::string ModuleUserBuildPath
 The directory used for a user build. More...
 
std::map< std::string, std::string > PrebuiltModuleFiles
 The mapping of module names to prebuilt module files. More...
 
std::vector< std::string > PrebuiltModulePaths
 The directories used to load prebuilt module files. More...
 
std::string ModuleFormat
 The module/pch container format. More...
 
unsigned DisableModuleHash: 1
 Whether we should disable the use of the hash string within the module cache. More...
 
unsigned ImplicitModuleMaps: 1
 Implicit module maps. More...
 
unsigned ModuleMapFileHomeIsCwd: 1
 Set the 'home directory' of a module map file to the current working directory (or the home directory of the module map file that contained the 'extern module' directive importing this module map file if any) rather than the directory containing the module map file. More...
 
unsigned ModuleCachePruneInterval
 The interval (in seconds) between pruning operations. More...
 
unsigned ModuleCachePruneAfter
 The time (in seconds) after which an unused module file will be considered unused and will, therefore, be pruned. More...
 
uint64_t BuildSessionTimestamp
 The time in seconds when the build session started. More...
 
llvm::SmallSetVector< llvm::CachedHashString, 16 > ModulesIgnoreMacros
 The set of macro names that should be ignored for the purposes of computing the module hash. More...
 
std::vector< std::string > VFSOverlayFiles
 The set of user-provided virtual filesystem overlay files. More...
 
unsigned UseBuiltinIncludes: 1
 Include the compiler builtin includes. More...
 
unsigned UseStandardSystemIncludes: 1
 Include the system standard include search directories. More...
 
unsigned UseStandardCXXIncludes: 1
 Include the system standard C++ library include search directories. More...
 
unsigned UseLibcxx: 1
 Use libc++ instead of the default libstdc++. More...
 
unsigned Verbose: 1
 Whether header search information should be output as for -v. More...
 
unsigned ModulesValidateOncePerBuildSession: 1
 If true, skip verifying input files used by modules if the module was already verified during this build session (see BuildSessionTimestamp). More...
 
unsigned ModulesValidateSystemHeaders: 1
 Whether to validate system input files when a module is loaded. More...
 
unsigned UseDebugInfo: 1
 Whether the module includes debug information (-gmodules). More...
 
unsigned ModulesValidateDiagnosticOptions: 1
 
unsigned ModulesHashContent: 1
 

Detailed Description

HeaderSearchOptions - Helper class for storing options related to the initialization of the HeaderSearch object.

Definition at line 48 of file HeaderSearchOptions.h.

Constructor & Destructor Documentation

◆ HeaderSearchOptions()

clang::HeaderSearchOptions::HeaderSearchOptions ( StringRef  _Sysroot = "/")
inline

Definition at line 187 of file HeaderSearchOptions.h.

Member Function Documentation

◆ AddPath()

void clang::HeaderSearchOptions::AddPath ( StringRef  Path,
frontend::IncludeDirGroup  Group,
bool  IsFramework,
bool  IgnoreSysRoot 
)
inline

AddPath - Add the Path path to the specified Group list.

Definition at line 199 of file HeaderSearchOptions.h.

◆ AddPrebuiltModulePath()

void clang::HeaderSearchOptions::AddPrebuiltModulePath ( StringRef  Name)
inline

Definition at line 215 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

◆ AddSystemHeaderPrefix()

void clang::HeaderSearchOptions::AddSystemHeaderPrefix ( StringRef  Prefix,
bool  IsSystemHeader 
)
inline

AddSystemHeaderPrefix - Override whether #include directives naming a path starting with Prefix should be considered as naming a system header.

Definition at line 207 of file HeaderSearchOptions.h.

◆ AddVFSOverlayFile()

void clang::HeaderSearchOptions::AddVFSOverlayFile ( StringRef  Name)
inline

Definition at line 211 of file HeaderSearchOptions.h.

Member Data Documentation

◆ BuildSessionTimestamp

uint64_t clang::HeaderSearchOptions::BuildSessionTimestamp

The time in seconds when the build session started.

This time is used by other optimizations in header search and module loading.

Definition at line 148 of file HeaderSearchOptions.h.

Referenced by isDiagnosedResult(), and ParseHeaderSearchArgs().

◆ DisableModuleHash

unsigned clang::HeaderSearchOptions::DisableModuleHash

Whether we should disable the use of the hash string within the module cache.

Note: Only used for testing!

Definition at line 111 of file HeaderSearchOptions.h.

Referenced by clang::CompilerInstance::getSpecificModuleCachePath(), and ParseHeaderSearchArgs().

◆ ImplicitModuleMaps

unsigned clang::HeaderSearchOptions::ImplicitModuleMaps

Implicit module maps.

This option is enabld by default when modules is enabled.

Definition at line 115 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

◆ ModuleCachePath

std::string clang::HeaderSearchOptions::ModuleCachePath

The directory used for the module cache.

Definition at line 93 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs(), and pruneModuleCache().

◆ ModuleCachePruneAfter

unsigned clang::HeaderSearchOptions::ModuleCachePruneAfter

The time (in seconds) after which an unused module file will be considered unused and will, therefore, be pruned.

When the module cache is pruned, any module file that has not been accessed in this many seconds will be removed. The default value is large, e.g., a month, to avoid forcing infrequently-used modules to be regenerated often.

Definition at line 142 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs(), and pruneModuleCache().

◆ ModuleCachePruneInterval

unsigned clang::HeaderSearchOptions::ModuleCachePruneInterval

The interval (in seconds) between pruning operations.

This operation is expensive, because it requires Clang to walk through the directory structure of the module cache, stat()'ing and removing files.

The default value is large, e.g., the operation runs once a week.

Definition at line 133 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs(), and pruneModuleCache().

◆ ModuleFormat

std::string clang::HeaderSearchOptions::ModuleFormat

The module/pch container format.

Definition at line 105 of file HeaderSearchOptions.h.

Referenced by clang::DumpModuleInfoAction::BeginInvocation(), and ParseHeaderSearchArgs().

◆ ModuleMapFileHomeIsCwd

unsigned clang::HeaderSearchOptions::ModuleMapFileHomeIsCwd

Set the 'home directory' of a module map file to the current working directory (or the home directory of the module map file that contained the 'extern module' directive importing this module map file if any) rather than the directory containing the module map file.

The home directory is where we look for files named in the module map file.

Definition at line 124 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

◆ ModulesHashContent

unsigned clang::HeaderSearchOptions::ModulesHashContent

Definition at line 185 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

◆ ModulesIgnoreMacros

llvm::SmallSetVector<llvm::CachedHashString, 16> clang::HeaderSearchOptions::ModulesIgnoreMacros

The set of macro names that should be ignored for the purposes of computing the module hash.

Definition at line 152 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

◆ ModulesValidateDiagnosticOptions

unsigned clang::HeaderSearchOptions::ModulesValidateDiagnosticOptions

Definition at line 183 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

◆ ModulesValidateOncePerBuildSession

unsigned clang::HeaderSearchOptions::ModulesValidateOncePerBuildSession

If true, skip verifying input files used by modules if the module was already verified during this build session (see BuildSessionTimestamp).

Definition at line 175 of file HeaderSearchOptions.h.

Referenced by isDiagnosedResult(), and ParseHeaderSearchArgs().

◆ ModulesValidateSystemHeaders

unsigned clang::HeaderSearchOptions::ModulesValidateSystemHeaders

Whether to validate system input files when a module is loaded.

Definition at line 178 of file HeaderSearchOptions.h.

Referenced by clang::CompilerInstance::createModuleManager(), clang::CompilerInstance::createPCHExternalASTSource(), and ParseHeaderSearchArgs().

◆ ModuleUserBuildPath

std::string clang::HeaderSearchOptions::ModuleUserBuildPath

The directory used for a user build.

Definition at line 96 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

◆ PrebuiltModuleFiles

std::map<std::string, std::string> clang::HeaderSearchOptions::PrebuiltModuleFiles

The mapping of module names to prebuilt module files.

Definition at line 99 of file HeaderSearchOptions.h.

Referenced by clang::CompilerInstance::loadModule(), and ParseHeaderSearchArgs().

◆ PrebuiltModulePaths

std::vector<std::string> clang::HeaderSearchOptions::PrebuiltModulePaths

The directories used to load prebuilt module files.

Definition at line 102 of file HeaderSearchOptions.h.

Referenced by clang::CompilerInstance::loadModule().

◆ ResourceDir

std::string clang::HeaderSearchOptions::ResourceDir

The directory which holds the compiler resource files (builtin includes, etc.).

Definition at line 90 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

◆ Sysroot

std::string clang::HeaderSearchOptions::Sysroot

◆ SystemHeaderPrefixes

std::vector<SystemHeaderPrefix> clang::HeaderSearchOptions::SystemHeaderPrefixes

User-specified system header prefixes.

Definition at line 86 of file HeaderSearchOptions.h.

◆ UseBuiltinIncludes

unsigned clang::HeaderSearchOptions::UseBuiltinIncludes

Include the compiler builtin includes.

Definition at line 158 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

◆ UseDebugInfo

unsigned clang::HeaderSearchOptions::UseDebugInfo

Whether the module includes debug information (-gmodules).

Definition at line 181 of file HeaderSearchOptions.h.

◆ UseLibcxx

unsigned clang::HeaderSearchOptions::UseLibcxx

Use libc++ instead of the default libstdc++.

Definition at line 167 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

◆ UserEntries

std::vector<Entry> clang::HeaderSearchOptions::UserEntries

User specified include entries.

Definition at line 83 of file HeaderSearchOptions.h.

Referenced by clang::ApplyHeaderSearchOptions().

◆ UseStandardCXXIncludes

unsigned clang::HeaderSearchOptions::UseStandardCXXIncludes

Include the system standard C++ library include search directories.

Definition at line 164 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

◆ UseStandardSystemIncludes

unsigned clang::HeaderSearchOptions::UseStandardSystemIncludes

Include the system standard include search directories.

Definition at line 161 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

◆ Verbose

unsigned clang::HeaderSearchOptions::Verbose

Whether header search information should be output as for -v.

Definition at line 170 of file HeaderSearchOptions.h.

Referenced by clang::ApplyHeaderSearchOptions(), and ParseHeaderSearchArgs().

◆ VFSOverlayFiles

std::vector<std::string> clang::HeaderSearchOptions::VFSOverlayFiles

The set of user-provided virtual filesystem overlay files.

Definition at line 155 of file HeaderSearchOptions.h.

Referenced by collectVFSEntries(), and clang::createVFSFromCompilerInvocation().


The documentation for this class was generated from the following file: