clang API Documentation
The preprocessor keeps track of this information for each file that is #included. More...
#include <HeaderSearch.h>
Public Member Functions | |
HeaderFileInfo () | |
const IdentifierInfo * | getControllingMacro (ExternalIdentifierLookup *External) |
Retrieve the controlling macro for this header file, if any. | |
bool | isNonDefault () const |
Determine whether this is a non-default header file info, e.g., it corresponds to an actual header we've included or tried to include. | |
ModuleMap::ModuleHeaderRole | getHeaderRole () const |
Get the HeaderRole properly typed. | |
void | setHeaderRole (ModuleMap::ModuleHeaderRole Role) |
Set the HeaderRole properly typed. | |
Public Attributes | |
unsigned | isImport: 1 |
True if this is a #import'd or #pragma once file. | |
unsigned | isPragmaOnce: 1 |
True if this is a #pragma once file. | |
unsigned | DirInfo: 2 |
unsigned | External: 1 |
Whether this header file info was supplied by an external source. | |
unsigned | isModuleHeader: 1 |
Whether this header is part of a module. | |
unsigned | isCompilingModuleHeader: 1 |
Whether this header is part of the module that we are building. | |
unsigned | HeaderRole: 2 |
Whether this header is part of the module that we are building. This is an instance of ModuleMap::ModuleHeaderRole. | |
unsigned | Resolved: 1 |
Whether this structure is considered to already have been "resolved", meaning that it was loaded from the external source. | |
unsigned | IndexHeaderMapHeader: 1 |
Whether this is a header inside a framework that is currently being built. | |
unsigned | IsValid: 1 |
Whether this file had been looked up as a header. | |
unsigned short | NumIncludes |
The number of times the file has been included already. | |
unsigned | ControllingMacroID |
The ID number of the controlling macro. | |
const IdentifierInfo * | ControllingMacro |
StringRef | Framework |
If this header came from a framework include, this is the name of the framework. |
The preprocessor keeps track of this information for each file that is #included.
Definition at line 38 of file HeaderSearch.h.
clang::HeaderFileInfo::HeaderFileInfo | ( | ) | [inline] |
Definition at line 104 of file HeaderSearch.h.
const IdentifierInfo * HeaderFileInfo::getControllingMacro | ( | ExternalIdentifierLookup * | External | ) |
Retrieve the controlling macro for this header file, if any.
Definition at line 35 of file HeaderSearch.cpp.
References ControllingMacro, ControllingMacroID, and clang::ExternalIdentifierLookup::GetIdentifier().
Referenced by clang::HeaderSearch::ShouldEnterIncludeFile().
ModuleMap::ModuleHeaderRole clang::HeaderFileInfo::getHeaderRole | ( | ) | const [inline] |
Get the HeaderRole properly typed.
Definition at line 123 of file HeaderSearch.h.
References HeaderRole.
bool clang::HeaderFileInfo::isNonDefault | ( | ) | const [inline] |
Determine whether this is a non-default header file info, e.g., it corresponds to an actual header we've included or tried to include.
Definition at line 117 of file HeaderSearch.h.
References ControllingMacro, ControllingMacroID, isImport, isPragmaOnce, and NumIncludes.
void clang::HeaderFileInfo::setHeaderRole | ( | ModuleMap::ModuleHeaderRole | Role | ) | [inline] |
Set the HeaderRole properly typed.
Definition at line 128 of file HeaderSearch.h.
References HeaderRole.
Referenced by clang::HeaderSearch::MarkFileModuleHeader().
If this file has a #ifndef XXX (or equivalent) guard that protects the entire contents of the file, this is the identifier for the macro that controls whether or not it has any effect.
Note: Most clients should use getControllingMacro() to access the controlling macro of this header, since getControllingMacro() is able to load a controlling macro from external storage.
Definition at line 98 of file HeaderSearch.h.
Referenced by getControllingMacro(), clang::HeaderSearch::isFileMultipleIncludeGuarded(), isNonDefault(), mergeHeaderFileInfo(), and clang::HeaderSearch::SetFileControllingMacro().
The ID number of the controlling macro.
This ID number will be non-zero when there is a controlling macro whose IdentifierInfo may not yet have been loaded from external storage.
Definition at line 88 of file HeaderSearch.h.
Referenced by getControllingMacro(), clang::HeaderSearch::isFileMultipleIncludeGuarded(), isNonDefault(), and mergeHeaderFileInfo().
DirInfo - Keep track of whether this is a system header, and if so, whether it is C++ clean or not. This can be set by the include paths or by #pragma gcc system_header. This is an instance of SrcMgr::CharacteristicKind.
Definition at line 49 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::getFileDirFlavor(), clang::HeaderSearch::LookupFile(), clang::HeaderSearch::LookupSubframeworkHeader(), clang::HeaderSearch::MarkFileSystemHeader(), and mergeHeaderFileInfo().
Whether this header file info was supplied by an external source.
Definition at line 52 of file HeaderSearch.h.
Referenced by mergeHeaderFileInfo().
StringRef clang::HeaderFileInfo::Framework |
If this header came from a framework include, this is the name of the framework.
Definition at line 102 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::LookupFile(), and mergeHeaderFileInfo().
Whether this header is part of the module that we are building. This is an instance of ModuleMap::ModuleHeaderRole.
Definition at line 62 of file HeaderSearch.h.
Referenced by getHeaderRole(), clang::serialization::reader::HeaderFileInfoTrait::ReadData(), and setHeaderRole().
Whether this is a header inside a framework that is currently being built.
When a framework is being built, the headers have not yet been placed into the appropriate framework subdirectories, and therefore are provided via a header map. This bit indicates when this is one of those framework headers.
Definition at line 75 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::LookupFile(), and mergeHeaderFileInfo().
Whether this header is part of the module that we are building.
Definition at line 58 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::MarkFileModuleHeader().
True if this is a #import'd or #pragma once file.
Definition at line 40 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::isFileMultipleIncludeGuarded(), isNonDefault(), clang::HeaderSearch::MarkFileIncludeOnce(), mergeHeaderFileInfo(), and clang::HeaderSearch::ShouldEnterIncludeFile().
Whether this header is part of a module.
Definition at line 55 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::MarkFileModuleHeader(), and mergeHeaderFileInfo().
True if this is a #pragma once file.
Definition at line 43 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::isFileMultipleIncludeGuarded(), isNonDefault(), clang::HeaderSearch::MarkFileIncludeOnce(), and mergeHeaderFileInfo().
Whether this file had been looked up as a header.
Definition at line 78 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::tryGetFileInfo().
The number of times the file has been included already.
Definition at line 81 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::FirstTimeLexingFile(), clang::HeaderSearch::IncrementIncludeCount(), isNonDefault(), mergeHeaderFileInfo(), and clang::HeaderSearch::ShouldEnterIncludeFile().
Whether this structure is considered to already have been "resolved", meaning that it was loaded from the external source.
Definition at line 66 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::isFileMultipleIncludeGuarded(), and mergeHeaderFileInfo().