clang 17.0.0git
|
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. | |
bool | hasLineDirectives () const |
Return true if this FileID has #line directives in it. | |
void | setHasLineDirectives () |
Set the flag that indicates that this FileID has line table entries associated with it. | |
StringRef | getName () const |
Returns the name of the file that was used when the file was loaded from the underlying file system. | |
Static Public Member Functions | |
static FileInfo | get (SourceLocation IL, ContentCache &Con, CharacteristicKind FileCharacter, StringRef Filename) |
Return a FileInfo object. | |
Friends | |
class | clang::SourceManager |
class | clang::ASTWriter |
class | clang::ASTReader |
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.
FileInfo should not grow larger than ExpansionInfo. Doing so will cause memory to bloat in compilations with many unloaded macro expansions, since the two data structurs are stored in a union in SLocEntry. Extra fields should instead go in "ContentCache *", which stores file contents and other bits on the side.
Definition at line 290 of file SourceManager.h.
|
inlinestatic |
Return a FileInfo object.
Definition at line 315 of file SourceManager.h.
References clang::SrcMgr::ContentCache::Filename, Filename, and X().
|
inline |
Definition at line 331 of file SourceManager.h.
Referenced by clang::SourceManager::getCharacterData(), clang::SourceManager::getFileEntryForSLocEntry(), clang::SourceManager::getLineNumber(), getName(), clang::SourceManager::getPresumedLoc(), clang::ScratchBuffer::getToken(), clang::ASTImporter::Import(), clang::Rewriter::IncreaseIndentation(), clang::Rewriter::InsertText(), clang::SourceManager::translateFile(), and clang::SourceManager::translateLineCol().
|
inline |
Return whether this is a system header or not.
Definition at line 336 of file SourceManager.h.
Referenced by clang::SourceManager::getFileCharacteristic(), getNullabilityCompletenessCheckFileID(), clang::ASTImporter::Import(), and clang::index::IndexingContext::importedModule().
|
inline |
Definition at line 327 of file SourceManager.h.
Referenced by clang::SourceManager::getDecomposedIncludedLoc(), getNullabilityCompletenessCheckFileID(), clang::SourceManager::getPresumedLoc(), clang::ASTImporter::Import(), and clang::SourceManager::isInMainFile().
|
inline |
Returns the name of the file that was used when the file was loaded from the underlying file system.
Definition at line 349 of file SourceManager.h.
References clang::SrcMgr::ContentCache::Filename, and getContentCache().
|
inline |
Return true if this FileID has #line directives in it.
Definition at line 341 of file SourceManager.h.
Referenced by clang::SourceManager::getFileCharacteristic(), clang::SourceManager::getPresumedLoc(), and clang::SourceManager::isInMainFile().
|
inline |
Set the flag that indicates that this FileID has line table entries associated with it.
Definition at line 345 of file SourceManager.h.
Referenced by clang::ASTReader::ReadSLocEntry().
|
friend |
Definition at line 293 of file SourceManager.h.
|
friend |
Definition at line 292 of file SourceManager.h.
|
friend |
Definition at line 291 of file SourceManager.h.