clang 18.0.0git
|
The preprocessor keeps track of this information for each file that is #included. More...
#include "clang/Lex/HeaderSearch.h"
Public Member Functions | |
HeaderFileInfo () | |
const IdentifierInfo * | getControllingMacro (ExternalPreprocessorSource *External) |
Retrieve the controlling macro for this header file, if any. | |
Public Attributes | |
unsigned | isImport: 1 |
True if this is a #import'd file. | |
unsigned | isPragmaOnce: 1 |
True if this is a #pragma once file. | |
unsigned | DirInfo: 3 |
Keep track of whether this is a system header, and if so, whether it is C++ clean or not. | |
unsigned | External: 1 |
Whether this header file info was supplied by an external source, and has not changed since. | |
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 | 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 has been looked up as a header. | |
unsigned | ControllingMacroID = 0 |
The ID number of the controlling macro. | |
const IdentifierInfo * | ControllingMacro = nullptr |
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. | |
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 58 of file HeaderSearch.h.
|
inline |
Definition at line 120 of file HeaderSearch.h.
const IdentifierInfo * HeaderFileInfo::getControllingMacro | ( | ExternalPreprocessorSource * | External | ) |
Retrieve the controlling macro for this header file, if any.
Definition at line 62 of file HeaderSearch.cpp.
References ControllingMacro, ControllingMacroID, External, and clang::IdentifierInfo::isOutOfDate().
Referenced by clang::HeaderSearch::ShouldEnterIncludeFile().
const IdentifierInfo* clang::HeaderFileInfo::ControllingMacro = nullptr |
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 114 of file HeaderSearch.h.
Referenced by getControllingMacro(), mergeHeaderFileInfo(), and clang::HeaderSearch::SetFileControllingMacro().
unsigned clang::HeaderFileInfo::ControllingMacroID = 0 |
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 104 of file HeaderSearch.h.
Referenced by getControllingMacro(), mergeHeaderFileInfo(), and clang::serialization::reader::HeaderFileInfoTrait::ReadData().
unsigned clang::HeaderFileInfo::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 71 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::getFileDirFlavor(), clang::HeaderSearch::LookupFile(), clang::HeaderSearch::LookupSubframeworkHeader(), clang::HeaderSearch::MarkFileSystemHeader(), mergeHeaderFileInfo(), and clang::serialization::reader::HeaderFileInfoTrait::ReadData().
unsigned clang::HeaderFileInfo::External |
Whether this header file info was supplied by an external source, and has not changed since.
Definition at line 75 of file HeaderSearch.h.
Referenced by getControllingMacro(), clang::HeaderSearch::getExistingFileInfo(), clang::HeaderSearch::getFileInfo(), mergeHeaderFileInfo(), and clang::serialization::reader::HeaderFileInfoTrait::ReadData().
StringRef clang::HeaderFileInfo::Framework |
If this header came from a framework include, this is the name of the framework.
Definition at line 118 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::LookupFile(), mergeHeaderFileInfo(), and clang::serialization::reader::HeaderFileInfoTrait::ReadData().
unsigned clang::HeaderFileInfo::IndexHeaderMapHeader |
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 94 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::LookupFile(), mergeHeaderFileInfo(), and clang::serialization::reader::HeaderFileInfoTrait::ReadData().
unsigned clang::HeaderFileInfo::isCompilingModuleHeader |
Whether this header is part of the module that we are building.
Definition at line 81 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::ShouldEnterIncludeFile().
unsigned clang::HeaderFileInfo::isImport |
True if this is a #import'd file.
Definition at line 62 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::hasFileBeenImported(), mergeHeaderFileInfo(), clang::serialization::reader::HeaderFileInfoTrait::ReadData(), and clang::HeaderSearch::ShouldEnterIncludeFile().
unsigned clang::HeaderFileInfo::isModuleHeader |
Whether this header is part of a module.
Definition at line 78 of file HeaderSearch.h.
Referenced by mergeHeaderFileInfo(), clang::serialization::reader::HeaderFileInfoTrait::ReadData(), and clang::HeaderSearch::ShouldEnterIncludeFile().
unsigned clang::HeaderFileInfo::isPragmaOnce |
True if this is a #pragma once file.
Definition at line 65 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::MarkFileIncludeOnce(), mergeHeaderFileInfo(), clang::serialization::reader::HeaderFileInfoTrait::ReadData(), and clang::HeaderSearch::ShouldEnterIncludeFile().
unsigned clang::HeaderFileInfo::IsValid |
Whether this file has been looked up as a header.
Definition at line 97 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::getExistingFileInfo(), clang::HeaderSearch::getFileInfo(), mergeHeaderFileInfo(), and clang::serialization::reader::HeaderFileInfoTrait::ReadData().
unsigned clang::HeaderFileInfo::Resolved |
Whether this structure is considered to already have been "resolved", meaning that it was loaded from the external source.
Definition at line 85 of file HeaderSearch.h.
Referenced by clang::HeaderSearch::getExistingFileInfo(), and clang::HeaderSearch::getFileInfo().