clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions
clang::InclusionDirective Class Reference

Record the location of an inclusion directive, such as an #include or #import statement. More...

#include <PreprocessingRecord.h>

Inheritance diagram for clang::InclusionDirective:
Inheritance graph
[legend]
Collaboration diagram for clang::InclusionDirective:
Collaboration graph
[legend]

List of all members.

Public Types

enum  InclusionKind { Include, Import, IncludeNext, IncludeMacros }
 The kind of inclusion directives known to the preprocessor. 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.
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.
const FileEntrygetFile () const
 Retrieve the file entry for the actual file that was included by this directive.

Static Public Member Functions

static bool classof (const PreprocessedEntity *PE)

Detailed Description

Record the location of an inclusion directive, such as an #include or #import statement.

Definition at line 196 of file PreprocessingRecord.h.


Member Enumeration Documentation

The kind of inclusion directives known to the preprocessor.

Enumerator:
Include 

An #include directive.

Import 

An Objective-C #import directive.

IncludeNext 

A GNU #include_next directive.

IncludeMacros 

A Clang #__include_macros directive.

Definition at line 200 of file PreprocessingRecord.h.


Constructor & Destructor Documentation

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().


Member Function Documentation

static bool clang::InclusionDirective::classof ( const PreprocessedEntity PE) [inline, static]

Reimplemented from clang::PreprocessingDirective.

Definition at line 257 of file PreprocessingRecord.h.

References clang::PreprocessedEntity::getKind().

const FileEntry* clang::InclusionDirective::getFile ( ) const [inline]

Retrieve the file entry for the actual file that was included by this directive.

Definition at line 254 of file PreprocessingRecord.h.

StringRef clang::InclusionDirective::getFileName ( ) const [inline]

Retrieve the included file name as it was written in the source.

Definition at line 242 of file PreprocessingRecord.h.

Determine what kind of inclusion directive this is.

Reimplemented from clang::PreprocessedEntity.

Definition at line 239 of file PreprocessingRecord.h.

Determine whether the inclusion directive was automatically turned into a module import.

Definition at line 250 of file PreprocessingRecord.h.

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.


The documentation for this class was generated from the following files: