clang API Documentation

Classes | Public Member Functions | Public Attributes
clang::HeaderSearchOptions Class Reference

#include <HeaderSearchOptions.h>

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

List of all members.

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.
void AddSystemHeaderPrefix (StringRef Prefix, bool IsSystemHeader)
void AddVFSOverlayFile (StringRef Name)

Public Attributes

std::string Sysroot
std::vector< EntryUserEntries
 User specified include entries.
std::vector< SystemHeaderPrefixSystemHeaderPrefixes
 User-specified system header prefixes.
std::string ResourceDir
std::string ModuleCachePath
 The directory used for the module cache.
std::string ModuleUserBuildPath
 The directory used for a user build.
unsigned DisableModuleHash: 1
 Whether we should disable the use of the hash string within the module cache.
unsigned ModuleMaps: 1
 Interpret module maps. This option is implied by full modules.
unsigned ModuleCachePruneInterval
 The interval (in seconds) between pruning operations.
unsigned ModuleCachePruneAfter
 The time (in seconds) after which an unused module file will be considered unused and will, therefore, be pruned.
uint64_t BuildSessionTimestamp
 The time in seconds when the build session started.
llvm::SetVector< std::string > ModulesIgnoreMacros
 The set of macro names that should be ignored for the purposes of computing the module hash.
llvm::SetVector< std::string > ModuleMapFiles
 The set of user-provided module-map-files.
std::vector< std::string > VFSOverlayFiles
 The set of user-provided virtual filesystem overlay files.
unsigned UseBuiltinIncludes: 1
 Include the compiler builtin includes.
unsigned UseStandardSystemIncludes: 1
 Include the system standard include search directories.
unsigned UseStandardCXXIncludes: 1
 Include the system standard C++ library include search directories.
unsigned UseLibcxx: 1
 Use libc++ instead of the default libstdc++.
unsigned Verbose: 1
 Whether header search information should be output as for -v.
unsigned ModulesValidateOncePerBuildSession: 1
 If true, skip verifying input files used by modules if the module was already verified during this build session (see BuildSessionTimestamp).
unsigned ModulesValidateSystemHeaders: 1
 Whether to validate system input files when a module is loaded.

Detailed Description

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

Definition at line 45 of file HeaderSearchOptions.h.


Constructor & Destructor Documentation

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

Definition at line 162 of file HeaderSearchOptions.h.


Member Function Documentation

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 174 of file HeaderSearchOptions.h.

References UserEntries.

Referenced by ParseHeaderSearchArgs().

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 182 of file HeaderSearchOptions.h.

References SystemHeaderPrefixes.

Referenced by ParseHeaderSearchArgs().

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

Definition at line 186 of file HeaderSearchOptions.h.

References VFSOverlayFiles.

Referenced by ParseHeaderSearchArgs().


Member Data Documentation

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 126 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

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

Note: Only used for testing!

Definition at line 99 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

The directory used for the module cache.

Definition at line 90 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs(), and pruneModuleCache().

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 120 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs(), and pruneModuleCache().

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 111 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs(), and pruneModuleCache().

llvm::SetVector<std::string> clang::HeaderSearchOptions::ModuleMapFiles

The set of user-provided module-map-files.

Definition at line 133 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

Interpret module maps. This option is implied by full modules.

Definition at line 102 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

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

Definition at line 130 of file HeaderSearchOptions.h.

Referenced by compileModuleImpl(), clang::CompilerInvocation::getModuleHash(), and ParseHeaderSearchArgs().

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

Definition at line 156 of file HeaderSearchOptions.h.

Referenced by ParseHeaderSearchArgs().

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

Definition at line 159 of file HeaderSearchOptions.h.

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

The directory used for a user build.

Definition at line 93 of file HeaderSearchOptions.h.

Referenced by clang::CompilerInvocation::getModuleHash(), and ParseHeaderSearchArgs().

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

Definition at line 87 of file HeaderSearchOptions.h.

Referenced by clang::ApplyHeaderSearchOptions(), clang::CompilerInvocation::getModuleHash(), clang::ASTUnit::LoadFromCompilerInvocationAction(), and ParseHeaderSearchArgs().

User-specified system header prefixes.

Definition at line 83 of file HeaderSearchOptions.h.

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

Include the compiler builtin includes.

Definition at line 139 of file HeaderSearchOptions.h.

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

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

Definition at line 148 of file HeaderSearchOptions.h.

Referenced by clang::CompilerInvocation::getModuleHash(), and ParseHeaderSearchArgs().

User specified include entries.

Definition at line 80 of file HeaderSearchOptions.h.

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

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

Definition at line 145 of file HeaderSearchOptions.h.

Referenced by clang::CompilerInvocation::getModuleHash(), and ParseHeaderSearchArgs().

Include the system standard include search directories.

Definition at line 142 of file HeaderSearchOptions.h.

Referenced by clang::CompilerInvocation::getModuleHash(), and ParseHeaderSearchArgs().

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

Definition at line 151 of file HeaderSearchOptions.h.

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

The set of user-provided virtual filesystem overlay files.

Definition at line 136 of file HeaderSearchOptions.h.

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


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