clang
3.9.0
|
Record the location of an inclusion directive, such as an #include
or #import
statement.
More...
#include <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, const FileEntry *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... | |
const FileEntry * | 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) LLVM_NOEXCEPT |
void * | operator new (size_t bytes, void *mem) LLVM_NOEXCEPT |
void | operator delete (void *ptr, PreprocessingRecord &PR, unsigned alignment) LLVM_NOEXCEPT |
void | operator delete (void *, std::size_t) LLVM_NOEXCEPT |
void | operator delete (void *, void *) LLVM_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 196 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 200 of file PreprocessingRecord.h.
InclusionDirective::InclusionDirective | ( | PreprocessingRecord & | PPRec, |
InclusionKind | Kind, | ||
StringRef | FileName, | ||
bool | InQuotes, | ||
bool | ImportedModule, | ||
const FileEntry * | File, | ||
SourceRange | Range | ||
) |
Definition at line 25 of file PreprocessingRecord.cpp.
References clang::PreprocessingRecord::Allocate().
|
inlinestatic |
Definition at line 257 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 254 of file PreprocessingRecord.h.
|
inline |
Retrieve the included file name as it was written in the source.
Definition at line 242 of file PreprocessingRecord.h.
|
inline |
Determine what kind of inclusion directive this is.
Definition at line 239 of file PreprocessingRecord.h.
|
inline |
Determine whether the inclusion directive was automatically turned into a module import.
Definition at line 250 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 246 of file PreprocessingRecord.h.