clang
15.0.0git
|
Record the location of an inclusion directive, such as an #include
or #import
statement.
More...
#include "clang/Lex/PreprocessingRecord.h"
Public Types | |
enum | InclusionKind { Include, Import, IncludeNext, IncludeMacros } |
The kind of inclusion directives known to the preprocessor. More... | |
![]() | |
enum | EntityKind { InvalidKind, MacroExpansionKind, MacroDefinitionKind, InclusionDirectiveKind, FirstPreprocessingDirective = MacroDefinitionKind, LastPreprocessingDirective = InclusionDirectiveKind } |
The kind of preprocessed entity an object describes. More... | |
Public Member Functions | |
InclusionDirective (PreprocessingRecord &PPRec, InclusionKind Kind, StringRef FileName, bool InQuotes, bool ImportedModule, Optional< FileEntryRef > File, SourceRange Range) | |
InclusionKind | getKind () const |
Determine what kind of inclusion directive this is. More... | |
StringRef | getFileName () const |
Retrieve the included file name as it was written in the source. More... | |
bool | wasInQuotes () const |
Determine whether the included file name was written in quotes; otherwise, it was written in angle brackets. More... | |
bool | importedModule () const |
Determine whether the inclusion directive was automatically turned into a module import. More... | |
Optional< FileEntryRef > | getFile () const |
Retrieve the file entry for the actual file that was included by this directive. More... | |
![]() | |
PreprocessingDirective (EntityKind Kind, SourceRange Range) | |
![]() | |
EntityKind | getKind () const |
Retrieve the kind of preprocessed entity stored in this object. More... | |
SourceRange | getSourceRange () const LLVM_READONLY |
Retrieve the source range that covers this entire preprocessed entity. More... | |
bool | isInvalid () const |
Returns true if there was a problem loading the preprocessed entity. More... | |
void * | operator new (size_t bytes, PreprocessingRecord &PR, unsigned alignment=8) noexcept |
void * | operator new (size_t bytes, void *mem) noexcept |
void | operator delete (void *ptr, PreprocessingRecord &PR, unsigned alignment) noexcept |
void | operator delete (void *, std::size_t) noexcept |
void | operator delete (void *, void *) noexcept |
Static Public Member Functions | |
static bool | classof (const PreprocessedEntity *PE) |
![]() | |
static bool | classof (const PreprocessedEntity *PD) |
Additional Inherited Members | |
![]() | |
PreprocessedEntity (EntityKind Kind, SourceRange Range) | |
Record the location of an inclusion directive, such as an #include
or #import
statement.
Definition at line 208 of file PreprocessingRecord.h.
The kind of inclusion directives known to the preprocessor.
Enumerator | |
---|---|
Include | An |
Import | An Objective-C |
IncludeNext | A GNU |
IncludeMacros | A Clang |
Definition at line 212 of file PreprocessingRecord.h.
InclusionDirective::InclusionDirective | ( | PreprocessingRecord & | PPRec, |
InclusionKind | Kind, | ||
StringRef | FileName, | ||
bool | InQuotes, | ||
bool | ImportedModule, | ||
Optional< FileEntryRef > | File, | ||
SourceRange | Range | ||
) |
Definition at line 42 of file PreprocessingRecord.cpp.
References clang::PreprocessingRecord::Allocate(), clang::File, and memcpy().
|
inlinestatic |
Definition at line 271 of file PreprocessingRecord.h.
References clang::PreprocessedEntity::getKind(), and clang::PreprocessedEntity::InclusionDirectiveKind.
|
inline |
Retrieve the file entry for the actual file that was included by this directive.
Definition at line 268 of file PreprocessingRecord.h.
References clang::File.
|
inline |
Retrieve the included file name as it was written in the source.
Definition at line 256 of file PreprocessingRecord.h.
|
inline |
Determine what kind of inclusion directive this is.
Definition at line 253 of file PreprocessingRecord.h.
|
inline |
Determine whether the inclusion directive was automatically turned into a module import.
Definition at line 264 of file PreprocessingRecord.h.
|
inline |
Determine whether the included file name was written in quotes; otherwise, it was written in angle brackets.
Definition at line 260 of file PreprocessingRecord.h.