clang  6.0.0svn
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  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. More...
 
bool isModuleMap (CharacteristicKind CK)
 Determine whether a file characteristic is for a module map. More...
 

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 78 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 88 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 83 of file SourceManager.h.

References C_User, and C_User_ModuleMap.

Referenced by clang::DependencyCollector::attachToASTReader(), clang::SourceManager::createFileID(), clang::SourceManager::isInSystemHeader(), and clang::ChainedASTReaderListener::takeSecond().