clang API Documentation

Public Types | Public Member Functions | Public Attributes
clang::serialization::ModuleFile Class Reference

Information about a module that has been loaded by the ASTReader. More...

#include <Module.h>

Collaboration diagram for clang::serialization::ModuleFile:
Collaboration graph
[legend]

List of all members.

Public Types

typedef llvm::DenseMap< const
DeclContext *, DeclContextInfo
DeclContextInfosMap

Public Member Functions

 ModuleFile (ModuleKind Kind, unsigned Generation)
 ~ModuleFile ()
bool isDirectlyImported () const
 Determine whether this module was directly imported at any point during translation.
void dump ()
 Dump debugging output for this module.

Public Attributes

ModuleKind Kind
 The type of this module.
std::string FileName
 The file name of the module file.
bool DirectlyImported
 Whether this module has been directly imported by the user.
unsigned Generation
 The generation of which this module file is a part.
OwningPtr< llvm::MemoryBuffer > Buffer
 The memory buffer that stores the data associated with this AST file.
uint64_t SizeInBits
 The size of this file, in bits.
uint64_t GlobalBitOffset
 The global bit offset (or base) of this module.
llvm::BitstreamReader StreamFile
 The bitstream reader from which we'll read the AST file.
llvm::BitstreamCursor Stream
 The main bitstream cursor for the main block.
SourceLocation ImportLoc
 The source location where this module was first imported.
SourceLocation FirstLoc
 The first source location in this module.
llvm::BitstreamCursor SLocEntryCursor
 Cursor used to read source location entries.
unsigned LocalNumSLocEntries
 The number of source location entries in this AST file.
int SLocEntryBaseID
 The base ID in the source manager's view of this module.
unsigned SLocEntryBaseOffset
 The base offset in the source manager's view of this module.
const uint32_t * SLocEntryOffsets
 Offsets for all of the source location entries in the AST file.
SmallVector< uint64_t, 4 > PreloadSLocEntries
 SLocEntries that we're going to preload.
unsigned LocalNumSLocFileEntries
 The number of source location file entries in this AST file.
const uint32_t * SLocFileOffsets
 Offsets for all of the source location file entries in the AST file.
ContinuousRangeMap< uint32_t,
int, 2 > 
SLocRemap
 Remapping table for source locations in this module.
unsigned LocalNumIdentifiers
 The number of identifiers in this AST file.
const uint32_t * IdentifierOffsets
 Offsets into the identifier table data.
serialization::IdentID BaseIdentifierID
 Base identifier ID for identifiers local to this module.
ContinuousRangeMap< uint32_t,
int, 2 > 
IdentifierRemap
 Remapping table for identifier IDs in this module.
const char * IdentifierTableData
 Actual data for the on-disk hash table of identifiers.
void * IdentifierLookupTable
 A pointer to an on-disk hash table of opaque type IdentifierHashTable.
llvm::BitstreamCursor MacroCursor
 The cursor to the start of the preprocessor block, which stores all of the macro definitions.
uint64_t MacroStartOffset
 The offset of the start of the set of defined macros.
llvm::BitstreamCursor PreprocessorDetailCursor
 The cursor to the start of the (optional) detailed preprocessing record block.
uint64_t PreprocessorDetailStartOffset
 The offset of the start of the preprocessor detail cursor.
serialization::PreprocessedEntityID BasePreprocessedEntityID
 Base preprocessed entity ID for preprocessed entities local to this module.
ContinuousRangeMap< uint32_t,
int, 2 > 
PreprocessedEntityRemap
 Remapping table for preprocessed entity IDs in this module.
const PPEntityOffsetPreprocessedEntityOffsets
unsigned NumPreprocessedEntities
unsigned LocalNumHeaderFileInfos
 The number of local HeaderFileInfo structures.
const char * HeaderFileInfoTableData
 Actual data for the on-disk hash table of header file information.
void * HeaderFileInfoTable
 The on-disk hash table that contains information about each of the header files.
const char * HeaderFileFrameworkStrings
 Actual data for the list of framework names used in the header search information.
unsigned LocalNumSubmodules
 The number of submodules in this module.
serialization::SubmoduleID BaseSubmoduleID
 Base submodule ID for submodules local to this module.
ContinuousRangeMap< uint32_t,
int, 2 > 
SubmoduleRemap
 Remapping table for submodule IDs in this module.
unsigned LocalNumSelectors
 The number of selectors new to this file.
const uint32_t * SelectorOffsets
 Offsets into the selector lookup table's data array where each selector resides.
serialization::SelectorID BaseSelectorID
 Base selector ID for selectors local to this module.
ContinuousRangeMap< uint32_t,
int, 2 > 
SelectorRemap
 Remapping table for selector IDs in this module.
const unsigned char * SelectorLookupTableData
 A pointer to the character data that comprises the selector table.
void * SelectorLookupTable
 A pointer to an on-disk hash table of opaque type ASTSelectorLookupTable.
llvm::BitstreamCursor DeclsCursor
unsigned LocalNumDecls
 The number of declarations in this AST file.
const DeclOffsetDeclOffsets
 Offset of each declaration within the bitstream, indexed by the declaration ID (-1).
serialization::DeclID BaseDeclID
 Base declaration ID for declarations local to this module.
ContinuousRangeMap< uint32_t,
int, 2 > 
DeclRemap
 Remapping table for declaration IDs in this module.
llvm::DenseMap< ModuleFile
*, serialization::DeclID
GlobalToLocalDeclIDs
 Mapping from the module files that this module file depends on to the base declaration ID for that module as it is understood within this module.
unsigned LocalNumCXXBaseSpecifiers
 The number of C++ base specifier sets in this AST file.
const uint32_t * CXXBaseSpecifiersOffsets
 Offset of each C++ base specifier set within the bitstream, indexed by the C++ base specifier set ID (-1).
DeclContextInfosMap DeclContextInfos
 Information about the lexical and visible declarations for each DeclContext.
const serialization::DeclIDFileSortedDecls
 Array of file-level DeclIDs sorted by file.
const
serialization::LocalRedeclarationsInfo
RedeclarationsMap
 Array of redeclaration chain location information within this module file, sorted by the first declaration ID.
unsigned LocalNumRedeclarationsInMap
 The number of redeclaration info entries in RedeclarationsMap.
SmallVector< uint64_t, 1 > RedeclarationChains
 The redeclaration chains for declarations local to this module file.
const
serialization::ObjCCategoriesInfo
ObjCCategoriesMap
 Array of category list location information within this module file, sorted by the definition ID.
unsigned LocalNumObjCCategoriesInMap
 The number of redeclaration info entries in ObjCCategoriesMap.
SmallVector< uint64_t, 1 > ObjCCategories
 The Objective-C category lists for categories known to this module.
unsigned LocalNumTypes
 The number of types in this AST file.
const uint32_t * TypeOffsets
 Offset of each type within the bitstream, indexed by the type ID, or the representation of a Type*.
serialization::TypeID BaseTypeIndex
 Base type ID for types local to this module as represented in the global type ID space.
ContinuousRangeMap< uint32_t,
int, 2 > 
TypeRemap
 Remapping table for type IDs in this module.
SmallVector< uint64_t, 8 > PragmaDiagMappings
 Diagnostic IDs and their mappings that the user changed.
void * StatCache
 The AST stat cache installed for this file, if any.
llvm::SetVector< ModuleFile * > ImportedBy
 List of modules which depend on this module.
llvm::SetVector< ModuleFile * > Imports
 List of modules which this module depends on.

Detailed Description

Information about a module that has been loaded by the ASTReader.

Each instance of the Module class corresponds to a single AST file, which may be a precompiled header, precompiled preamble, a module, or an AST file of some sort loaded as the main file, all of which are specific formulations of the general notion of a "module". A module may depend on any number of other modules.

Definition at line 64 of file Serialization/Module.h.


Member Typedef Documentation

Definition at line 289 of file Serialization/Module.h.


Constructor & Destructor Documentation

ModuleFile::ModuleFile ( ModuleKind  Kind,
unsigned  Generation 
)

Definition at line 23 of file Serialization/Module.cpp.

ModuleFile::~ModuleFile ( )

Member Function Documentation

void ModuleFile::dump ( )
bool clang::serialization::ModuleFile::isDirectlyImported ( ) const [inline]

Determine whether this module was directly imported at any point during translation.

Definition at line 354 of file Serialization/Module.h.

References DirectlyImported.


Member Data Documentation

Base declaration ID for declarations local to this module.

Definition at line 267 of file Serialization/Module.h.

Referenced by dump().

Base identifier ID for identifiers local to this module.

Definition at line 150 of file Serialization/Module.h.

Referenced by clang::ASTReader::DecodeIdentifierInfo(), and dump().

Base preprocessed entity ID for preprocessed entities local to this module.

Definition at line 185 of file Serialization/Module.h.

Referenced by dump().

Base selector ID for selectors local to this module.

Definition at line 235 of file Serialization/Module.h.

Referenced by dump().

Base submodule ID for submodules local to this module.

Definition at line 218 of file Serialization/Module.h.

Referenced by dump().

Base type ID for types local to this module as represented in the global type ID space.

Definition at line 331 of file Serialization/Module.h.

Referenced by dump().

OwningPtr<llvm::MemoryBuffer> clang::serialization::ModuleFile::Buffer

The memory buffer that stores the data associated with this AST file.

Definition at line 86 of file Serialization/Module.h.

Referenced by clang::serialization::ModuleManager::addModule().

Offset of each C++ base specifier set within the bitstream, indexed by the C++ base specifier set ID (-1).

Definition at line 286 of file Serialization/Module.h.

Referenced by clang::ASTReader::readCXXBaseSpecifiers().

Information about the lexical and visible declarations for each DeclContext.

Definition at line 293 of file Serialization/Module.h.

Referenced by ~ModuleFile().

Offset of each declaration within the bitstream, indexed by the declaration ID (-1).

Definition at line 264 of file Serialization/Module.h.

Remapping table for declaration IDs in this module.

Definition at line 270 of file Serialization/Module.h.

Referenced by dump(), and clang::ASTReader::getGlobalDeclID().

DeclsCursor - This is a cursor to the start of the DECLS_BLOCK block. It has read all the abbreviations at the start of the block and is ready to jump around with these in context.

Definition at line 257 of file Serialization/Module.h.

Whether this module has been directly imported by the user.

Definition at line 79 of file Serialization/Module.h.

Referenced by clang::serialization::ModuleManager::addModule(), and isDirectlyImported().

Array of file-level DeclIDs sorted by file.

Definition at line 296 of file Serialization/Module.h.

The first source location in this module.

Definition at line 104 of file Serialization/Module.h.

The generation of which this module file is a part.

Definition at line 82 of file Serialization/Module.h.

Referenced by clang::serialization::ReadMethodPoolVisitor::visit().

The global bit offset (or base) of this module.

Definition at line 92 of file Serialization/Module.h.

Referenced by clang::ASTReader::setIdentifierIsMacro().

Mapping from the module files that this module file depends on to the base declaration ID for that module as it is understood within this module.

This is effectively a reverse global-to-local mapping for declaration IDs, so that we can interpret a true global ID (for this translation unit) as a local ID (for this module file).

Definition at line 279 of file Serialization/Module.h.

Referenced by clang::ASTReader::mapGlobalIDToModuleFileGlobalID().

Actual data for the list of framework names used in the header search information.

Definition at line 211 of file Serialization/Module.h.

The on-disk hash table that contains information about each of the header files.

Definition at line 207 of file Serialization/Module.h.

Referenced by ~ModuleFile().

Actual data for the on-disk hash table of header file information.

This pointer points into a memory buffer, where the on-disk hash table for header file information actually lives.

Definition at line 203 of file Serialization/Module.h.

A pointer to an on-disk hash table of opaque type IdentifierHashTable.

Definition at line 163 of file Serialization/Module.h.

Referenced by ~ModuleFile().

Offsets into the identifier table data.

This array is indexed by the identifier ID (-1), and provides the offset into IdentifierTableData where the string data is stored.

Definition at line 147 of file Serialization/Module.h.

Remapping table for identifier IDs in this module.

Definition at line 153 of file Serialization/Module.h.

Referenced by dump(), and clang::ASTReader::getGlobalIdentifierID().

Actual data for the on-disk hash table of identifiers.

This pointer points into a memory buffer, where the on-disk hash table for identifiers actually lives.

Definition at line 159 of file Serialization/Module.h.

List of modules which depend on this module.

Definition at line 347 of file Serialization/Module.h.

Referenced by clang::serialization::ModuleManager::addModule().

The source location where this module was first imported.

Definition at line 101 of file Serialization/Module.h.

The type of this module.

Definition at line 72 of file Serialization/Module.h.

The number of C++ base specifier sets in this AST file.

Definition at line 282 of file Serialization/Module.h.

The number of declarations in this AST file.

Definition at line 260 of file Serialization/Module.h.

Referenced by dump().

The number of local HeaderFileInfo structures.

Definition at line 196 of file Serialization/Module.h.

The number of identifiers in this AST file.

Definition at line 140 of file Serialization/Module.h.

Referenced by dump().

The number of redeclaration info entries in ObjCCategoriesMap.

Definition at line 314 of file Serialization/Module.h.

The number of redeclaration info entries in RedeclarationsMap.

Definition at line 303 of file Serialization/Module.h.

The number of selectors new to this file.

This is the number of entries in SelectorOffsets.

Definition at line 228 of file Serialization/Module.h.

Referenced by dump().

The number of source location entries in this AST file.

Definition at line 112 of file Serialization/Module.h.

The number of source location file entries in this AST file.

Definition at line 128 of file Serialization/Module.h.

Referenced by clang::ASTReader::validateFileEntries().

The number of submodules in this module.

Definition at line 215 of file Serialization/Module.h.

Referenced by dump().

The number of types in this AST file.

Definition at line 323 of file Serialization/Module.h.

Referenced by dump().

The cursor to the start of the preprocessor block, which stores all of the macro definitions.

Definition at line 169 of file Serialization/Module.h.

Referenced by clang::ASTReader::ReadMacroRecord().

The offset of the start of the set of defined macros.

Definition at line 172 of file Serialization/Module.h.

Definition at line 191 of file Serialization/Module.h.

Referenced by dump().

The Objective-C category lists for categories known to this module.

Definition at line 318 of file Serialization/Module.h.

Array of category list location information within this module file, sorted by the definition ID.

Definition at line 311 of file Serialization/Module.h.

Diagnostic IDs and their mappings that the user changed.

Definition at line 339 of file Serialization/Module.h.

Referenced by clang::ASTReader::ReadPragmaDiagnosticMappings().

SLocEntries that we're going to preload.

Definition at line 125 of file Serialization/Module.h.

Remapping table for preprocessed entity IDs in this module.

Definition at line 188 of file Serialization/Module.h.

Referenced by dump(), and clang::ASTReader::getGlobalPreprocessedEntityID().

The cursor to the start of the (optional) detailed preprocessing record block.

Definition at line 178 of file Serialization/Module.h.

Referenced by clang::ASTReader::ReadPreprocessedEntity().

The offset of the start of the preprocessor detail cursor.

Definition at line 181 of file Serialization/Module.h.

The redeclaration chains for declarations local to this module file.

Definition at line 307 of file Serialization/Module.h.

Array of redeclaration chain location information within this module file, sorted by the first declaration ID.

Definition at line 300 of file Serialization/Module.h.

A pointer to an on-disk hash table of opaque type ASTSelectorLookupTable.

This hash table provides the IDs of all selectors, and the associated instance and factory methods.

Definition at line 250 of file Serialization/Module.h.

Referenced by clang::serialization::ReadMethodPoolVisitor::visit(), and ~ModuleFile().

A pointer to the character data that comprises the selector table.

The SelectorOffsets table refers into this memory.

Definition at line 243 of file Serialization/Module.h.

Offsets into the selector lookup table's data array where each selector resides.

Definition at line 232 of file Serialization/Module.h.

Remapping table for selector IDs in this module.

Definition at line 238 of file Serialization/Module.h.

Referenced by dump(), and clang::ASTReader::getGlobalSelectorID().

The size of this file, in bits.

Definition at line 89 of file Serialization/Module.h.

The base ID in the source manager's view of this module.

Definition at line 115 of file Serialization/Module.h.

The base offset in the source manager's view of this module.

Definition at line 118 of file Serialization/Module.h.

Referenced by dump().

Cursor used to read source location entries.

Definition at line 109 of file Serialization/Module.h.

Referenced by clang::ASTReader::validateFileEntries().

Offsets for all of the source location entries in the AST file.

Definition at line 122 of file Serialization/Module.h.

Offsets for all of the source location file entries in the AST file.

Definition at line 132 of file Serialization/Module.h.

Referenced by clang::ASTReader::validateFileEntries().

Remapping table for source locations in this module.

Definition at line 135 of file Serialization/Module.h.

Referenced by clang::ASTReader::ReadSourceLocation().

The AST stat cache installed for this file, if any.

The dynamic type of this stat cache is always ASTStatCache

Definition at line 344 of file Serialization/Module.h.

The main bitstream cursor for the main block.

Definition at line 98 of file Serialization/Module.h.

The bitstream reader from which we'll read the AST file.

Definition at line 95 of file Serialization/Module.h.

Referenced by clang::serialization::ModuleManager::addModule().

Remapping table for submodule IDs in this module.

Definition at line 221 of file Serialization/Module.h.

Referenced by dump(), and clang::ASTReader::getGlobalSubmoduleID().

Offset of each type within the bitstream, indexed by the type ID, or the representation of a Type*.

Definition at line 327 of file Serialization/Module.h.

Remapping table for type IDs in this module.

Definition at line 334 of file Serialization/Module.h.

Referenced by dump(), and clang::ASTReader::getGlobalTypeID().


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