clang 8.0.0

Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::SrcMgr::FileInfo Class Reference

Information about a FileID, basically just the logical file that it represents and include stack information. More...

`#include "clang/Basic/SourceManager.h"`

## Public Member Functions
SourceLocation | getIncludeLoc () const
const ContentCache * | getContentCache () const
CharacteristicKind | getFileCharacteristic () const
| Return whether this is a system header or not. More...
bool | hasLineDirectives () const
| Return true if this FileID has #line directives in it. More...
void | setHasLineDirectives ()
| Set the flag that indicates that this FileID has line table entries associated with it. More...

## Static Public Member Functions
static FileInfo | get (SourceLocation IL, const ContentCache *Con, CharacteristicKind FileCharacter)
| Return a FileInfo object. More...

## Friends
class | clang::SourceManager
class | clang::ASTWriter
class | clang::ASTReader

## Detailed Description

Information about a FileID, basically just the logical file that it represents and include stack information.

Each FileInfo has include stack information, indicating where it came from. This information encodes the #include chain that a token was expanded from. The main include file has an invalid IncludeLoc.

FileInfos contain a "ContentCache *", with the contents of the file.

Definition at line 244 of file SourceManager.h.

## Member Function Documentation

## ◆ get()

static FileInfo clang::SrcMgr::FileInfo::get | ( | SourceLocation | IL,
|  | const ContentCache * | Con,
|  | CharacteristicKind | FileCharacter
| ) |  |
| inline static

Return a FileInfo object.

Definition at line 269 of file SourceManager.h.

References X.

## ◆ getContentCache()

const ContentCache* clang::SrcMgr::FileInfo::getContentCache | ( |  | ) | const
| inline

Definition at line 284 of file SourceManager.h.

Referenced by emitBlob(), clang::SourceManager::getBuffer(), clang::SourceManager::getBufferData(), clang::SourceManager::getCharacterData(), clang::SourceManager::getFileEntryForID(), clang::SourceManager::getFileEntryForSLocEntry(), clang::SourceManager::getLineNumber(), clang::SourceManager::getPresumedLoc(), clang::ASTImporter::Import(), clang::SourceManager::translateFile(), and clang::SourceManager::translateLineCol().

## ◆ getFileCharacteristic()

CharacteristicKind clang::SrcMgr::FileInfo::getFileCharacteristic | ( |  | ) | const
| inline

Return whether this is a system header or not.

Definition at line 289 of file SourceManager.h.

Referenced by emitBlob(), clang::SourceManager::getFileCharacteristic(), getNullabilityCompletenessCheckFileID(), clang::ASTImporter::Import(), clang::index::IndexingContext::importedModule(), and shouldReportOccurrenceForSystemDeclOnlyMode().

## ◆ getIncludeLoc()

SourceLocation clang::SrcMgr::FileInfo::getIncludeLoc | ( |  | ) | const
| inline

Definition at line 280 of file SourceManager.h.

References clang::SourceLocation::getFromRawEncoding().

Referenced by emitBlob(), clang::SourceManager::getDecomposedIncludedLoc(), clang::SourceManager::getIncludeLoc(), getNullabilityCompletenessCheckFileID(), clang::SourceManager::getPresumedLoc(), clang::ASTImporter::Import(), clang::SourceManager::isInMainFile(), and clang::SourceManager::translateLineCol().

## ◆ hasLineDirectives()

bool clang::SrcMgr::FileInfo::hasLineDirectives | ( |  | ) | const
| inline

Return true if this FileID has #line directives in it.

Definition at line 294 of file SourceManager.h.

Referenced by emitBlob(), clang::SourceManager::getFileCharacteristic(), clang::SourceManager::getPresumedLoc(), and clang::SourceManager::isInMainFile().

## ◆ setHasLineDirectives()

void clang::SrcMgr::FileInfo::setHasLineDirectives | ( |  | ) |
| inline

Set the flag that indicates that this FileID has line table entries associated with it.

Definition at line 298 of file SourceManager.h.

## Friends And Related Function Documentation

## ◆ clang::ASTReader

friend class clang::ASTReader
| friend

Definition at line 247 of file SourceManager.h.

## ◆ clang::ASTWriter

friend class clang::ASTWriter
| friend

Definition at line 246 of file SourceManager.h.

## ◆ clang::SourceManager

friend class clang::SourceManager
| friend

Definition at line 245 of file SourceManager.h.

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

- include/clang/Basic/SourceManager.h