clang 20.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... | |
Public Types inherited from clang::PreprocessedEntity | |
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, OptionalFileEntryRef File, SourceRange Range) | |
InclusionKind | getKind () const |
Determine what kind of inclusion directive this is. | |
StringRef | getFileName () const |
Retrieve the included file name as it was written in the source. | |
bool | wasInQuotes () const |
Determine whether the included file name was written in quotes; otherwise, it was written in angle brackets. | |
bool | importedModule () const |
Determine whether the inclusion directive was automatically turned into a module import. | |
OptionalFileEntryRef | getFile () const |
Retrieve the file entry for the actual file that was included by this directive. | |
Public Member Functions inherited from clang::PreprocessingDirective | |
PreprocessingDirective (EntityKind Kind, SourceRange Range) | |
Public Member Functions inherited from clang::PreprocessedEntity | |
EntityKind | getKind () const |
Retrieve the kind of preprocessed entity stored in this object. | |
SourceRange | getSourceRange () const LLVM_READONLY |
Retrieve the source range that covers this entire preprocessed entity. | |
bool | isInvalid () const |
Returns true if there was a problem loading the preprocessed entity. | |
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 Public Member Functions inherited from clang::PreprocessingDirective | |
static bool | classof (const PreprocessedEntity *PD) |
Additional Inherited Members | |
Protected Member Functions inherited from clang::PreprocessedEntity | |
PreprocessedEntity (EntityKind Kind, SourceRange Range) | |
Record the location of an inclusion directive, such as an #include
or #import
statement.
Definition at line 206 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 210 of file PreprocessingRecord.h.
InclusionDirective::InclusionDirective | ( | PreprocessingRecord & | PPRec, |
InclusionKind | Kind, | ||
StringRef | FileName, | ||
bool | InQuotes, | ||
bool | ImportedModule, | ||
OptionalFileEntryRef | File, | ||
SourceRange | Range | ||
) |
Definition at line 42 of file PreprocessingRecord.cpp.
References clang::PreprocessingRecord::Allocate(), clang::FileName, and memcpy().
|
inlinestatic |
Definition at line 272 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 269 of file PreprocessingRecord.h.
References clang::File.
|
inline |
Retrieve the included file name as it was written in the source.
Definition at line 257 of file PreprocessingRecord.h.
References clang::FileName.
|
inline |
Determine what kind of inclusion directive this is.
Definition at line 254 of file PreprocessingRecord.h.
|
inline |
Determine whether the inclusion directive was automatically turned into a module import.
Definition at line 265 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 261 of file PreprocessingRecord.h.