clang: clang::ASTRecordReader Class Reference (original) (raw)

An object for streaming information from a record. More...

#include "[clang/Serialization/ASTRecordReader.h](ASTRecordReader%5F8h%5Fsource.html)"

Public Member Functions
ASTRecordReader (ASTReader &Reader, ModuleFile &F)
Construct an ASTRecordReader that uses the default encoding scheme.
Expected< unsigned > readRecord (llvm::BitstreamCursor &Cursor, unsigned AbbrevID)
Reads a record with id AbbrevID from Cursor, resetting the internal state.
bool isModule () const
Is this a module file for a module (rather than a PCH or similar).
ASTContext & getContext ()
Retrieve the AST context that this AST reader supplements.
unsigned getIdx () const
The current position in this record.
size_t size () const
The length of this record.
const uint64_t & operator[] (size_t N)
An arbitrary index in this record.
uint64_t back ()
Returns the last value in this record.
uint64_t readInt ()
Returns the current value in this record, and advances to the next value.
ArrayRef< uint64_t > readIntArray (unsigned Len)
uint64_t peekInt ()
Returns the current value in this record, without advancing.
void skipInts (unsigned N)
Skips the specified number of values.
serialization::SubmoduleID getGlobalSubmoduleID (unsigned LocalID)
Retrieve the global submodule ID its local ID number.
Module * getSubmodule (serialization::SubmoduleID GlobalID)
Retrieve the submodule that corresponds to a global submodule ID.
bool readLexicalDeclContextStorage (uint64_t Offset, DeclContext *DC)
Read the record that describes the lexical contents of a DC.
ExplicitSpecifier readExplicitSpec ()
uint64_t getGlobalBitOffset (uint64_t LocalOffset)
Read information about an exception specification (inherited).
Stmt * readStmt ()
Reads a statement.
Stmt * readStmtRef ()
Expr * readExpr ()
Reads an expression.
Stmt * readSubStmt ()
Reads a sub-statement operand during statement reading.
Expr * readSubExpr ()
Reads a sub-expression operand during statement reading.
template<typename T >
T * GetLocalDeclAs (LocalDeclID LocalID)
Reads a declaration with the given local ID in the given module.
TemplateArgumentLocInfo readTemplateArgumentLocInfo (TemplateArgument::ArgKind Kind)
Reads a TemplateArgumentLocInfo appropriate for the given TemplateArgument kind, advancing Idx.
TemplateArgumentLoc readTemplateArgumentLoc ()
Reads a TemplateArgumentLoc, advancing Idx.
void readTemplateArgumentListInfo (TemplateArgumentListInfo &Result)
const ASTTemplateArgumentListInfo * readASTTemplateArgumentListInfo ()
ConceptReference * readConceptReference ()
TypeSourceInfo * readTypeSourceInfo ()
Reads a declarator info from the given record, advancing Idx.
void readTypeLoc (TypeLoc TL, LocSeq *Seq=nullptr)
Reads the location information for a type.
serialization::TypeID getGlobalTypeID (serialization::TypeID LocalID) const
Map a local type ID within a given AST file to a global type ID.
Qualifiers readQualifiers ()
QualType readType ()
Read a type from the current position in the record.
QualType readQualType ()
GlobalDeclID readDeclID ()
Reads a declaration ID from the given position in this record.
Decl * readDecl ()
Reads a declaration from the given position in a record in the given module, advancing Idx.
Decl * readDeclRef ()
template<typename T >
T * readDeclAs ()
Reads a declaration from the given position in the record, advancing Idx.
IdentifierInfo * readIdentifier ()
Selector readSelector ()
Read a selector from the Record, advancing Idx.
TypeCoupledDeclRefInfo readTypeCoupledDeclRefInfo ()
DeclarationNameLoc readDeclarationNameLoc (DeclarationName Name)
Read a declaration name, advancing Idx.
DeclarationNameInfo readDeclarationNameInfo ()
void readQualifierInfo (QualifierInfo &Info)
NestedNameSpecifierLoc readNestedNameSpecifierLoc ()
Return a nested name specifier, advancing Idx.
TemplateArgument readTemplateArgument (bool Canonicalize)
TemplateParameterList * readTemplateParameterList ()
Read a template parameter list, advancing Idx.
void readTemplateArgumentList (SmallVectorImpl< TemplateArgument > &TemplArgs, bool Canonicalize=false)
Read a template argument array, advancing Idx.
void readUnresolvedSet (LazyASTUnresolvedSet &Set)
Read a UnresolvedSet structure, advancing Idx.
CXXBaseSpecifier readCXXBaseSpecifier ()
Read a C++ base specifier, advancing Idx.
CXXCtorInitializer ** readCXXCtorInitializers ()
Read a CXXCtorInitializer array, advancing Idx.
CXXTemporary * readCXXTemporary ()
OMPTraitInfo * readOMPTraitInfo ()
Read an OMPTraitInfo object, advancing Idx.
OMPClause * readOMPClause ()
Read an OpenMP clause, advancing Idx.
void readOMPChildren (OMPChildren *Data)
Read an OpenMP children, advancing Idx.
llvm::SmallVector< Expr * > readOpenACCVarList ()
Read a list of Exprs used for a var-list.
llvm::SmallVector< Expr * > readOpenACCIntExprList ()
Read a list of Exprs used for a int-expr-list.
OpenACCClause * readOpenACCClause ()
Read an OpenACC clause, advancing Idx.
void readOpenACCClauseList (MutableArrayRef< const OpenACCClause * > Clauses)
Read a list of OpenACC clauses into the passed SmallVector.
SourceLocation readSourceLocation (LocSeq *Seq=nullptr)
Read a source location, advancing Idx.
SourceRange readSourceRange (LocSeq *Seq=nullptr)
Read a source range, advancing Idx.
llvm::APFloat readAPFloat (const llvm::fltSemantics &Sem)
Read an arbitrary constant value, advancing Idx.
bool readBool ()
Read a boolean value, advancing Idx.
uint32_t readUInt32 ()
Read a 32-bit unsigned value; required to satisfy BasicReader.
uint64_t readUInt64 ()
Read a 64-bit unsigned value; required to satisfy BasicReader.
std::string readString ()
Read a string, advancing Idx.
std::string readPath ()
Read a path, advancing Idx.
VersionTuple readVersionTuple ()
Read a version tuple, advancing Idx.
Attr * readAttr ()
Reads one attribute from the current stream position, advancing Idx.
void readAttributes (AttrVec &Attrs)
Reads attributes from the current stream position, advancing Idx.
BTFTypeTagAttr * readBTFTypeTagAttr ()
Read an BTFTypeTagAttr object.
Token readToken ()
Reads a token out of a record, advancing Idx.
void recordSwitchCaseID (SwitchCase *SC, unsigned ID)
SwitchCase * getSwitchCaseWithID (unsigned ID)
Retrieve the switch-case statement with the given ID.
- Public Member Functions inherited from clang::serialization::DataStreamBasicReader< ASTRecordReader >
ASTRecordReader & find (const char *propertyName)
Implement property-find by ignoring it.
T readEnum ()
ASTRecordReader & readObject ()
llvm::ArrayRef< T > readArray (llvm::SmallVectorImpl< T > &buffer)
std::optional< T > readOptional (Args &&...args)
llvm::APSInt readAPSInt ()
llvm::APInt readAPInt ()
llvm::FixedPointSemantics readFixedPointSemantics ()
APValue::LValuePathSerializationHelper readLValuePathSerializationHelper (SmallVectorImpl< APValue::LValuePathEntry > &path)
Qualifiers readQualifiers ()
FunctionProtoType::ExceptionSpecInfo readExceptionSpecInfo (llvm::SmallVectorImpl< QualType > &buffer)
FunctionProtoType::ExtParameterInfo readExtParameterInfo ()
FunctionEffect readFunctionEffect ()
EffectConditionExpr readEffectConditionExpr ()
NestedNameSpecifier * readNestedNameSpecifier ()

An object for streaming information from a record.

Definition at line 32 of file ASTRecordReader.h.

back()

uint64_t clang::ASTRecordReader::back ( ) inline

getContext()

ASTContext & clang::ASTRecordReader::getContext ( ) inline

getGlobalBitOffset()

uint64_t clang::ASTRecordReader::getGlobalBitOffset ( uint64_t LocalOffset) inline

Read information about an exception specification (inherited).

Get the global offset corresponding to a local offset.

Definition at line 119 of file ASTRecordReader.h.

getGlobalSubmoduleID()

getGlobalTypeID()

getIdx()

unsigned clang::ASTRecordReader::getIdx ( ) const inline

GetLocalDeclAs()

template<typename T >

T * clang::ASTRecordReader::GetLocalDeclAs ( LocalDeclID LocalID) inline

getSubmodule()

getSwitchCaseWithID()

isModule()

bool clang::ASTRecordReader::isModule ( ) const inline

operator[]()

const uint64_t & clang::ASTRecordReader::operator[] ( size_t N) inline

peekInt()

uint64_t clang::ASTRecordReader::peekInt ( ) inline

Returns the current value in this record, without advancing.

Definition at line 84 of file ASTRecordReader.h.

readAPFloat()

llvm::APFloat ASTRecordReader::readAPFloat ( const llvm::fltSemantics & Sem )

readASTTemplateArgumentListInfo()

readAttr()

Attr * ASTRecordReader::readAttr ( )

readAttributes()

void ASTRecordReader::readAttributes ( AttrVec & Attrs )

Reads attributes from the current stream position, advancing Idx.

Reads attributes from the current stream position.

Definition at line 3183 of file ASTReaderDecl.cpp.

References E, readAttr(), and readInt().

readBool()

bool clang::ASTRecordReader::readBool ( ) inline

readBTFTypeTagAttr()

BTFTypeTagAttr * clang::ASTRecordReader::readBTFTypeTagAttr ( ) inline

readConceptReference()

readCXXBaseSpecifier()

readCXXCtorInitializers()

Read a CXXCtorInitializer array, advancing Idx.

Definition at line 9827 of file ASTReader.cpp.

References clang::serialization::CTOR_INITIALIZER_BASE, clang::serialization::CTOR_INITIALIZER_DELEGATING, clang::serialization::CTOR_INITIALIZER_INDIRECT_MEMBER, clang::serialization::CTOR_INITIALIZER_MEMBER, getContext(), clang::Init, clang::Member, readBool(), readExpr(), readInt(), readSourceLocation(), readTypeSourceInfo(), and clang::CXXCtorInitializer::setSourceOrder().

readCXXTemporary()

CXXTemporary * clang::ASTRecordReader::readCXXTemporary ( ) inline

readDecl()

Decl * clang::ASTRecordReader::readDecl ( ) inline

readDeclarationNameInfo()

readDeclarationNameLoc()

Read a declaration name, advancing Idx.

Definition at line 9722 of file ASTReader.cpp.

References clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDeductionGuideName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, clang::DeclarationName::CXXUsingDirective, clang::DeclarationName::Identifier, clang::DeclarationNameLoc::makeCXXLiteralOperatorNameLoc(), clang::DeclarationNameLoc::makeCXXOperatorNameLoc(), clang::DeclarationNameLoc::makeNamedTypeLoc(), clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, clang::DeclarationName::ObjCZeroArgSelector, readSourceLocation(), readSourceRange(), and readTypeSourceInfo().

Referenced by readDeclarationNameInfo().

readDeclAs()

template<typename T >

T * clang::ASTRecordReader::readDeclAs ( ) inline

readDeclID()

readDeclRef()

Decl * clang::ASTRecordReader::readDeclRef ( ) inline

readExplicitSpec()

readExpr()

Expr * clang::ASTRecordReader::readExpr ( ) inline

readIdentifier()

readInt()

uint64_t clang::ASTRecordReader::readInt ( ) inline

Returns the current value in this record, and advances to the next value.

Definition at line 75 of file ASTRecordReader.h.

Referenced by readAttributes(), readBool(), readCXXBaseSpecifier(), readCXXCtorInitializers(), readExplicitSpec(), readNestedNameSpecifierLoc(), readOpenACCClause(), readOpenACCIntExprList(), readOpenACCVarList(), readQualifierInfo(), readQualifiers(), readTemplateArgumentList(), readTemplateParameterList(), readUInt32(), readUInt64(), and readUnresolvedSet().

readIntArray()

ArrayRef< uint64_t > clang::ASTRecordReader::readIntArray ( unsigned Len) inline

readLexicalDeclContextStorage()

bool clang::ASTRecordReader::readLexicalDeclContextStorage ( uint64_t Offset, DeclContext * DC ) inline

readNestedNameSpecifierLoc()

Return a nested name specifier, advancing Idx.

Definition at line 9892 of file ASTReader.cpp.

References clang::SourceRange::getBegin(), getContext(), clang::SourceRange::getEnd(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, Range, readBool(), readIdentifier(), readInt(), readSourceLocation(), readSourceRange(), readTypeSourceInfo(), clang::NestedNameSpecifier::Super, clang::T, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.

Referenced by readQualifierInfo().

readOMPChildren()

void ASTRecordReader::readOMPChildren ( OMPChildren * Data )

readOMPClause()

OMPClause * ASTRecordReader::readOMPClause ( )

readOMPTraitInfo()

readOpenACCClause()

Read an OpenACC clause, advancing Idx.

Definition at line 12532 of file ASTReader.cpp.

References clang::Async, clang::Attach, clang::Auto, clang::Bind, clang::Collapse, clang::Copy, clang::CopyIn, clang::CopyOut, clang::OpenACCDeviceTypeClause::Create(), clang::OpenACCCopyClause::Create(), clang::OpenACCCopyInClause::Create(), clang::OpenACCCopyOutClause::Create(), clang::OpenACCCreateClause::Create(), clang::OpenACCDefaultClause::Create(), clang::OpenACCNumGangsClause::Create(), clang::OpenACCTileClause::Create(), clang::OpenACCPrivateClause::Create(), clang::OpenACCFirstPrivateClause::Create(), clang::OpenACCDevicePtrClause::Create(), clang::OpenACCAttachClause::Create(), clang::OpenACCDetachClause::Create(), clang::OpenACCDeleteClause::Create(), clang::OpenACCUseDeviceClause::Create(), clang::OpenACCNoCreateClause::Create(), clang::OpenACCPresentClause::Create(), clang::OpenACCHostClause::Create(), clang::OpenACCDeviceClause::Create(), clang::OpenACCCollapseClause::Create(), clang::OpenACCIfClause::Create(), clang::OpenACCSelfClause::Create(), clang::OpenACCWaitClause::Create(), clang::OpenACCNumWorkersClause::Create(), clang::OpenACCVectorLengthClause::Create(), clang::OpenACCAsyncClause::Create(), clang::OpenACCDeviceNumClause::Create(), clang::OpenACCDefaultAsyncClause::Create(), clang::OpenACCReductionClause::Create(), clang::OpenACCAutoClause::Create(), clang::OpenACCFinalizeClause::Create(), clang::OpenACCIfPresentClause::Create(), clang::OpenACCIndependentClause::Create(), clang::OpenACCSeqClause::Create(), clang::OpenACCGangClause::Create(), clang::OpenACCWorkerClause::Create(), clang::OpenACCVectorClause::Create(), clang::Create, clang::Default, clang::DefaultAsync, clang::Delete, clang::Detach, clang::Device, clang::DeviceNum, clang::DevicePtr, clang::DeviceResident, clang::DeviceType, clang::DType, clang::Finalize, clang::FirstPrivate, clang::Gang, getContext(), clang::Host, clang::If, clang::IfPresent, clang::Independent, clang::Invalid, clang::Link, Loc, clang::NoCreate, clang::NoHost, clang::NumGangs, clang::NumWorkers, clang::PCopy, clang::PCopyIn, clang::PCopyOut, clang::PCreate, clang::Present, clang::PresentOrCopy, clang::PresentOrCopyIn, clang::PresentOrCopyOut, clang::PresentOrCreate, clang::Private, readBool(), readIdentifier(), readInt(), readOpenACCIntExprList(), readOpenACCVarList(), readSourceLocation(), readSubExpr(), clang::Reduction, clang::Self, clang::Seq, clang::Tile, clang::UseDevice, clang::Vector, clang::VectorLength, clang::Wait, and clang::Worker.

Referenced by readOpenACCClauseList().

readOpenACCClauseList()

readOpenACCIntExprList()

readOpenACCVarList()

readPath()

std::string clang::ASTRecordReader::readPath ( ) inline

readQualifierInfo()

readQualifiers()

Qualifiers clang::ASTRecordReader::readQualifiers ( ) inline

readQualType()

QualType clang::ASTRecordReader::readQualType ( ) inline

readRecord()

Reads a record with id AbbrevID from Cursor, resetting the internal state.

Definition at line 10924 of file ASTReader.cpp.

readSelector()

Selector clang::ASTRecordReader::readSelector ( ) inline

readSourceLocation()

readSourceRange()

readStmt()

Stmt * clang::ASTRecordReader::readStmt ( ) inline

readStmtRef()

Stmt * clang::ASTRecordReader::readStmtRef ( ) inline

readString()

std::string clang::ASTRecordReader::readString ( ) inline

readSubExpr()

Expr * clang::ASTRecordReader::readSubExpr ( ) inline

readSubStmt()

Stmt * clang::ASTRecordReader::readSubStmt ( ) inline

readTemplateArgument()

readTemplateArgumentList()

readTemplateArgumentListInfo()

readTemplateArgumentLoc()

readTemplateArgumentLocInfo()

Reads a TemplateArgumentLocInfo appropriate for the given TemplateArgument kind, advancing Idx.

Definition at line 7766 of file ASTReader.cpp.

References clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgument::Integral, clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TemplateArgument::StructuralValue, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.

readTemplateParameterList()

readToken()

Token clang::ASTRecordReader::readToken ( ) inline

readType()

QualType clang::ASTRecordReader::readType ( ) inline

readTypeCoupledDeclRefInfo()

readTypeLoc()

void ASTRecordReader::readTypeLoc ( TypeLoc TL,
LocSeq * Seq = nullptr
)

readTypeSourceInfo()

readUInt32()

uint32_t clang::ASTRecordReader::readUInt32 ( ) inline

readUInt64()

uint64_t clang::ASTRecordReader::readUInt64 ( ) inline

readUnresolvedSet()

readVersionTuple()

VersionTuple clang::ASTRecordReader::readVersionTuple ( ) inline

recordSwitchCaseID()

size()

size_t clang::ASTRecordReader::size ( ) const inline

skipInts()

void clang::ASTRecordReader::skipInts ( unsigned N) inline

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