clang 20.0.0git
Classes | Enumerations | Functions
clang::SrcMgr Namespace Reference

Public enums and private classes that are part of the SourceManager implementation. More...

Classes

class  ContentCache
 One instance of this struct is kept for every file loaded or used. More...
 
class  ExpansionInfo
 Each ExpansionInfo encodes the expansion location - where the token was ultimately expanded, and the SpellingLoc - where the actual character data for the token came from. More...
 
class  FileInfo
 Information about a FileID, basically just the logical file that it represents and include stack information. More...
 
class  LineOffsetMapping
 Mapping of line offsets into a source file. More...
 
class  SLocEntry
 This is a discriminated union of FileInfo and ExpansionInfo. More...
 

Enumerations

enum  CharacteristicKind {
  C_User , C_System , C_ExternCSystem , C_User_ModuleMap ,
  C_System_ModuleMap
}
 Indicates whether a file or directory holds normal user code, system code, or system code which is implicitly 'extern "C"' in C++ mode. More...
 

Functions

bool isSystem (CharacteristicKind CK)
 Determine whether a file / directory characteristic is for system code.
 
bool isModuleMap (CharacteristicKind CK)
 Determine whether a file characteristic is for a module map.
 

Detailed Description

Public enums and private classes that are part of the SourceManager implementation.

Enumeration Type Documentation

◆ CharacteristicKind

Indicates whether a file or directory holds normal user code, system code, or system code which is implicitly 'extern "C"' in C++ mode.

Entire directories can be tagged with this (this is maintained by DirectoryLookup and friends) as can specific FileInfos when a #pragma system_header is seen or in various other cases.

Enumerator
C_User 
C_System 
C_ExternCSystem 
C_User_ModuleMap 
C_System_ModuleMap 

Definition at line 81 of file SourceManager.h.

Function Documentation

◆ isModuleMap()

bool clang::SrcMgr::isModuleMap ( CharacteristicKind  CK)
inline

Determine whether a file characteristic is for a module map.

Definition at line 95 of file SourceManager.h.

References C_System_ModuleMap, and C_User_ModuleMap.

◆ isSystem()

bool clang::SrcMgr::isSystem ( CharacteristicKind  CK)
inline

Determine whether a file / directory characteristic is for system code.

Definition at line 90 of file SourceManager.h.

References C_User, and C_User_ModuleMap.

Referenced by clang::SourceManager::createFileID(), and shouldRecordNewFile().