clang
10.0.0git
|
An object for streaming information from a record. More...
#include "clang/Serialization/ASTRecordReader.h"
Public Member Functions | |
ASTRecordReader (ASTReader &Reader, ModuleFile &F) | |
Construct an ASTRecordReader that uses the default encoding scheme. More... | |
Expected< unsigned > | readRecord (llvm::BitstreamCursor &Cursor, unsigned AbbrevID) |
Reads a record with id AbbrevID from Cursor, resetting the internal state. More... | |
bool | isModule () const |
Is this a module file for a module (rather than a PCH or similar). More... | |
ASTContext & | getContext () |
Retrieve the AST context that this AST reader supplements. More... | |
unsigned | getIdx () const |
The current position in this record. More... | |
size_t | size () const |
The length of this record. More... | |
const uint64_t & | operator[] (size_t N) |
An arbitrary index in this record. More... | |
uint64_t | back () |
Returns the last value in this record. More... | |
uint64_t | readInt () |
Returns the current value in this record, and advances to the next value. More... | |
ArrayRef< uint64_t > | readIntArray (unsigned Len) |
uint64_t | peekInt () |
Returns the current value in this record, without advancing. More... | |
void | skipInts (unsigned N) |
Skips the specified number of values. More... | |
serialization::SubmoduleID | getGlobalSubmoduleID (unsigned LocalID) |
Retrieve the global submodule ID its local ID number. More... | |
Module * | getSubmodule (serialization::SubmoduleID GlobalID) |
Retrieve the submodule that corresponds to a global submodule ID. More... | |
bool | readLexicalDeclContextStorage (uint64_t Offset, DeclContext *DC) |
Read the record that describes the lexical contents of a DC. More... | |
bool | readVisibleDeclContextStorage (uint64_t Offset, serialization::DeclID ID) |
Read the record that describes the visible contents of a DC. More... | |
ExplicitSpecifier | readExplicitSpec () |
uint64_t | getGlobalBitOffset (uint32_t LocalOffset) |
Read information about an exception specification (inherited). More... | |
Stmt * | readStmt () |
Reads a statement. More... | |
Stmt * | readStmtRef () |
Expr * | readExpr () |
Reads an expression. More... | |
Stmt * | readSubStmt () |
Reads a sub-statement operand during statement reading. More... | |
Expr * | readSubExpr () |
Reads a sub-expression operand during statement reading. More... | |
template<typename T > | |
T * | GetLocalDeclAs (uint32_t LocalID) |
Reads a declaration with the given local ID in the given module. More... | |
TemplateArgumentLocInfo | readTemplateArgumentLocInfo (TemplateArgument::ArgKind Kind) |
Reads a TemplateArgumentLocInfo appropriate for the given TemplateArgument kind, advancing Idx. More... | |
TemplateArgumentLoc | readTemplateArgumentLoc () |
Reads a TemplateArgumentLoc, advancing Idx. More... | |
const ASTTemplateArgumentListInfo * | readASTTemplateArgumentListInfo () |
TypeSourceInfo * | readTypeSourceInfo () |
Reads a declarator info from the given record, advancing Idx. More... | |
void | readTypeLoc (TypeLoc TL) |
Reads the location information for a type. More... | |
serialization::TypeID | getGlobalTypeID (unsigned LocalID) const |
Map a local type ID within a given AST file to a global type ID. More... | |
Qualifiers | readQualifiers () |
QualType | readType () |
Read a type from the current position in the record. More... | |
QualType | readQualType () |
serialization::DeclID | readDeclID () |
Reads a declaration ID from the given position in this record. More... | |
Decl * | readDecl () |
Reads a declaration from the given position in a record in the given module, advancing Idx. More... | |
Decl * | readDeclRef () |
template<typename T > | |
T * | readDeclAs () |
Reads a declaration from the given position in the record, advancing Idx. More... | |
IdentifierInfo * | readIdentifier () |
Selector | readSelector () |
Read a selector from the Record, advancing Idx. More... | |
DeclarationNameLoc | readDeclarationNameLoc (DeclarationName Name) |
Read a declaration name, advancing Idx. More... | |
DeclarationNameInfo | readDeclarationNameInfo () |
void | readQualifierInfo (QualifierInfo &Info) |
NestedNameSpecifierLoc | readNestedNameSpecifierLoc () |
Return a nested name specifier, advancing Idx. More... | |
TemplateArgument | readTemplateArgument (bool Canonicalize) |
TemplateParameterList * | readTemplateParameterList () |
Read a template parameter list, advancing Idx. More... | |
void | readTemplateArgumentList (SmallVectorImpl< TemplateArgument > &TemplArgs, bool Canonicalize=false) |
Read a template argument array, advancing Idx. More... | |
void | readUnresolvedSet (LazyASTUnresolvedSet &Set) |
Read a UnresolvedSet structure, advancing Idx. More... | |
CXXBaseSpecifier | readCXXBaseSpecifier () |
Read a C++ base specifier, advancing Idx. More... | |
CXXCtorInitializer ** | readCXXCtorInitializers () |
Read a CXXCtorInitializer array, advancing Idx. More... | |
CXXTemporary * | readCXXTemporary () |
OMPClause * | readOMPClause () |
Read an OpenMP clause, advancing Idx. More... | |
SourceLocation | readSourceLocation () |
Read a source location, advancing Idx. More... | |
SourceRange | readSourceRange () |
Read a source range, advancing Idx. More... | |
APValue | readAPValue () |
Read an arbitrary constant value, advancing Idx. More... | |
llvm::APFloat | readAPFloat (const llvm::fltSemantics &Sem) |
Read an integral value, advancing Idx. More... | |
bool | readBool () |
Read a boolean value, advancing Idx. More... | |
uint32_t | readUInt32 () |
Read a 32-bit unsigned value; required to satisfy BasicReader. More... | |
uint64_t | readUInt64 () |
Read a 64-bit unsigned value; required to satisfy BasicReader. More... | |
std::string | readString () |
Read a string, advancing Idx. More... | |
std::string | readPath () |
Read a path, advancing Idx. More... | |
VersionTuple | readVersionTuple () |
Read a version tuple, advancing Idx. More... | |
Attr * | readAttr () |
Reads one attribute from the current stream position, advancing Idx. More... | |
void | readAttributes (AttrVec &Attrs) |
Reads attributes from the current stream position, advancing Idx. More... | |
Token | readToken () |
Reads a token out of a record, advancing Idx. More... | |
void | recordSwitchCaseID (SwitchCase *SC, unsigned ID) |
SwitchCase * | getSwitchCaseWithID (unsigned ID) |
Retrieve the switch-case statement with the given ID. More... | |
![]() | |
ASTRecordReader & | find (const char *propertyName) |
Implement property-find by ignoring it. More... | |
T | readEnum () |
ASTRecordReader & | readObject () |
llvm::ArrayRef< T > | readArray (llvm::SmallVectorImpl< T > &buffer) |
llvm::Optional< T > | readOptional (Args &&...args) |
llvm::APSInt | readAPSInt () |
llvm::APInt | readAPInt () |
Qualifiers | readQualifiers () |
FunctionProtoType::ExceptionSpecInfo | readExceptionSpecInfo (llvm::SmallVectorImpl< QualType > &buffer) |
FunctionProtoType::ExtParameterInfo | readExtParameterInfo () |
NestedNameSpecifier * | readNestedNameSpecifier () |
Additional Inherited Members | |
![]() | |
DataStreamBasicReader (ASTContext &ctx) | |
An object for streaming information from a record.
Definition at line 27 of file ASTRecordReader.h.
|
inline |
Construct an ASTRecordReader that uses the default encoding scheme.
Definition at line 41 of file ASTRecordReader.h.
References readRecord().
|
inline |
Returns the last value in this record.
Definition at line 65 of file ASTRecordReader.h.
|
inline |
Retrieve the AST context that this AST reader supplements.
Definition at line 53 of file ASTRecordReader.h.
References clang::ASTReader::getContext().
Referenced by readConstraintSatisfaction(), readSubstitutionDiagnostic(), and readTemplateArgument().
|
inline |
Read information about an exception specification (inherited).
Get the global offset corresponding to a local offset.
Definition at line 120 of file ASTRecordReader.h.
|
inline |
Retrieve the global submodule ID its local ID number.
Definition at line 85 of file ASTRecordReader.h.
References clang::ASTReader::getGlobalSubmoduleID().
|
inline |
Map a local type ID within a given AST file to a global type ID.
Definition at line 164 of file ASTRecordReader.h.
References clang::ASTReader::getGlobalTypeID().
|
inline |
The current position in this record.
Definition at line 56 of file ASTRecordReader.h.
|
inline |
Reads a declaration with the given local ID in the given module.
Definition at line 141 of file ASTRecordReader.h.
References clang::ASTReader::GetLocalDecl(), readASTTemplateArgumentListInfo(), readTemplateArgumentLoc(), readTemplateArgumentLocInfo(), readTypeLoc(), and readTypeSourceInfo().
Referenced by clang::ASTDeclReader::VisitOMPCapturedExprDecl().
|
inline |
Retrieve the submodule that corresponds to a global submodule ID.
Definition at line 90 of file ASTRecordReader.h.
References clang::ASTReader::getSubmodule().
|
inline |
Retrieve the switch-case statement with the given ID.
Definition at line 330 of file ASTRecordReader.h.
References clang::ASTReader::getSwitchCaseWithID().
|
inline |
Is this a module file for a module (rather than a PCH or similar).
Definition at line 50 of file ASTRecordReader.h.
References clang::serialization::ModuleFile::isModule().
|
inline |
An arbitrary index in this record.
Definition at line 62 of file ASTRecordReader.h.
|
inline |
Returns the current value in this record, without advancing.
Definition at line 78 of file ASTRecordReader.h.
llvm::APFloat ASTRecordReader::readAPFloat | ( | const llvm::fltSemantics & | Sem | ) |
Read an integral value, advancing Idx.
Read a floating-point value.
Read a signed integral value, advancing Idx. Read a floating-point value, advancing Idx.
Definition at line 8879 of file ASTReader.cpp.
Referenced by readSourceRange().
APValue ASTRecordReader::readAPValue | ( | ) |
Read an arbitrary constant value, advancing Idx.
Definition at line 8838 of file ASTReader.cpp.
References clang::APValue::AddrLabelDiff, clang::APValue::Array, clang::APValue::ComplexFloat, clang::APValue::ComplexInt, clang::First, clang::APValue::FixedPoint, clang::APValue::Float, clang::APValue::Indeterminate, clang::APValue::IndeterminateValue(), clang::APValue::Int, clang::APValue::LValue, clang::APValue::MemberPointer, clang::APValue::None, readAPFloatSemantics(), ReadFixedPointSemantics(), clang::APValue::Struct, clang::APValue::Union, and clang::APValue::Vector.
Referenced by readSourceRange().
const ASTTemplateArgumentListInfo * ASTRecordReader::readASTTemplateArgumentListInfo | ( | ) |
Definition at line 7051 of file ASTReader.cpp.
References clang::TemplateArgumentListInfo::addArgument(), and clang::ASTTemplateArgumentListInfo::Create().
Referenced by GetLocalDeclAs().
Attr * ASTRecordReader::readAttr | ( | ) |
Reads one attribute from the current stream position, advancing Idx.
Definition at line 2765 of file ASTReaderDecl.cpp.
References V.
Referenced by readVersionTuple().
void ASTRecordReader::readAttributes | ( | AttrVec & | Attrs | ) |
Reads attributes from the current stream position, advancing Idx.
Reads attributes from the current stream position.
Definition at line 2796 of file ASTReaderDecl.cpp.
Referenced by readVersionTuple().
|
inline |
Read a boolean value, advancing Idx.
Definition at line 287 of file ASTRecordReader.h.
References readInt().
CXXBaseSpecifier ASTRecordReader::readCXXBaseSpecifier | ( | ) |
Read a C++ base specifier, advancing Idx.
Definition at line 8670 of file ASTReader.cpp.
References clang::Result, and clang::CXXBaseSpecifier::setInheritConstructors().
Referenced by readTemplateArgument().
CXXCtorInitializer ** ASTRecordReader::readCXXCtorInitializers | ( | ) |
Read a CXXCtorInitializer array, advancing Idx.
Definition at line 8685 of file ASTReader.cpp.
Referenced by clang::ASTReader::GetExternalCXXCtorInitializers(), and readTemplateArgument().
|
inline |
Definition at line 257 of file ASTRecordReader.h.
References clang::ASTReader::ReadCXXTemporary(), and readOMPClause().
|
inline |
Reads a declaration from the given position in a record in the given module, advancing Idx.
Definition at line 189 of file ASTRecordReader.h.
References clang::ASTReader::ReadDecl().
Referenced by readDeclRef().
DeclarationNameInfo ASTRecordReader::readDeclarationNameInfo | ( | ) |
Definition at line 8609 of file ASTReader.cpp.
References clang::DeclarationNameInfo::getName(), clang::DeclarationNameInfo::setInfo(), clang::DeclarationNameInfo::setLoc(), and clang::DeclarationNameInfo::setName().
DeclarationNameLoc ASTRecordReader::readDeclarationNameLoc | ( | DeclarationName | Name | ) |
Read a declaration name, advancing Idx.
Definition at line 8577 of file ASTReader.cpp.
Referenced by readSelector().
|
inline |
Reads a declaration from the given position in the record, advancing Idx.
Definition at line 202 of file ASTRecordReader.h.
References clang::ASTReader::ReadDeclAs().
|
inline |
Reads a declaration ID from the given position in this record.
Definition at line 183 of file ASTRecordReader.h.
References clang::ASTReader::ReadDeclID().
|
inline |
Definition at line 192 of file ASTRecordReader.h.
References readDecl().
|
inline |
Definition at line 107 of file ASTRecordReader.h.
References readExpr(), and readInt().
|
inline |
Reads an expression.
Definition at line 129 of file ASTRecordReader.h.
References clang::ASTReader::ReadExpr().
Referenced by readConstraintSatisfaction(), readExplicitSpec(), and clang::ASTDeclReader::VisitOMPCapturedExprDecl().
|
inline |
Definition at line 206 of file ASTRecordReader.h.
References clang::ASTReader::readIdentifier().
Referenced by clang::ASTDeclReader::VisitOMPCapturedExprDecl().
|
inline |
Returns the current value in this record, and advances to the next value.
Definition at line 69 of file ASTRecordReader.h.
Referenced by readAPFloatSemantics(), readBool(), readConstraintSatisfaction(), readExplicitSpec(), readQualifiers(), readUInt32(), readUInt64(), and clang::ASTDeclReader::VisitOMPCapturedExprDecl().
|
inline |
Definition at line 71 of file ASTRecordReader.h.
|
inline |
Read the record that describes the lexical contents of a DC.
Definition at line 95 of file ASTRecordReader.h.
References clang::serialization::ModuleFile::DeclsCursor.
NestedNameSpecifierLoc ASTRecordReader::readNestedNameSpecifierLoc | ( | ) |
Return a nested name specifier, advancing Idx.
Definition at line 8750 of file ASTReader.cpp.
OMPClause * ASTRecordReader::readOMPClause | ( | ) |
Read an OpenMP clause, advancing Idx.
Definition at line 11517 of file ASTReader.cpp.
References OMPClauseReader.
Referenced by readCXXTemporary().
|
inline |
Read a path, advancing Idx.
Definition at line 305 of file ASTRecordReader.h.
References clang::ASTReader::ReadPath().
void ASTRecordReader::readQualifierInfo | ( | QualifierInfo & | Info | ) |
Definition at line 8617 of file ASTReader.cpp.
References clang::QualifierInfo::NumTemplParamLists, clang::QualifierInfo::QualifierLoc, and clang::QualifierInfo::TemplParamLists.
|
inline |
Definition at line 168 of file ASTRecordReader.h.
References clang::Qualifiers::fromOpaqueValue(), and readInt().
|
inline |
Definition at line 176 of file ASTRecordReader.h.
References readType().
Expected< unsigned > ASTRecordReader::readRecord | ( | llvm::BitstreamCursor & | Cursor, |
unsigned | AbbrevID | ||
) |
Reads a record with id AbbrevID from Cursor, resetting the internal state.
Definition at line 11486 of file ASTReader.cpp.
Referenced by ASTRecordReader(), and clang::ASTReader::GetExternalCXXCtorInitializers().
|
inline |
Read a selector from the Record, advancing Idx.
Definition at line 211 of file ASTRecordReader.h.
References readDeclarationNameLoc(), and clang::ASTReader::ReadSelector().
|
inline |
Read a source location, advancing Idx.
Definition at line 265 of file ASTRecordReader.h.
References clang::ASTReader::ReadSourceLocation().
Referenced by readConstraintSatisfaction(), readSubstitutionDiagnostic(), and clang::ASTDeclReader::VisitOMPCapturedExprDecl().
|
inline |
Read a source range, advancing Idx.
Definition at line 270 of file ASTRecordReader.h.
References readAPFloat(), readAPValue(), and clang::ASTReader::ReadSourceRange().
Referenced by clang::ASTDeclReader::VisitOMPCapturedExprDecl().
|
inline |
Reads a statement.
Definition at line 125 of file ASTRecordReader.h.
References clang::ASTReader::ReadStmt().
Referenced by readStmtRef().
|
inline |
Definition at line 126 of file ASTRecordReader.h.
References readStmt().
|
inline |
Read a string, advancing Idx.
Definition at line 300 of file ASTRecordReader.h.
References clang::ASTReader::ReadString().
Referenced by readConstraintSatisfaction(), readSubstitutionDiagnostic(), and clang::ASTDeclReader::VisitOMPCapturedExprDecl().
|
inline |
Reads a sub-expression operand during statement reading.
Definition at line 135 of file ASTRecordReader.h.
References clang::ASTReader::ReadSubExpr().
|
inline |
Reads a sub-statement operand during statement reading.
Definition at line 132 of file ASTRecordReader.h.
References clang::ASTReader::ReadSubStmt().
|
inline |
Definition at line 233 of file ASTRecordReader.h.
References clang::ASTContext::getCanonicalTemplateArgument(), getContext(), readCXXBaseSpecifier(), readCXXCtorInitializers(), readTemplateArgumentList(), readTemplateParameterList(), and readUnresolvedSet().
void ASTRecordReader::readTemplateArgumentList | ( | SmallVectorImpl< TemplateArgument > & | TemplArgs, |
bool | Canonicalize = false |
||
) |
Read a template argument array, advancing Idx.
Definition at line 8649 of file ASTReader.cpp.
Referenced by readTemplateArgument().
TemplateArgumentLoc ASTRecordReader::readTemplateArgumentLoc | ( | ) |
Reads a TemplateArgumentLoc, advancing Idx.
Definition at line 7040 of file ASTReader.cpp.
References clang::TemplateArgument::Expression, clang::TemplateArgument::getAsExpr(), and clang::TemplateArgument::getKind().
Referenced by GetLocalDeclAs().
TemplateArgumentLocInfo ASTRecordReader::readTemplateArgumentLocInfo | ( | TemplateArgument::ArgKind | Kind | ) |
Reads a TemplateArgumentLocInfo appropriate for the given TemplateArgument kind, advancing Idx.
Definition at line 7009 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::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.
Referenced by GetLocalDeclAs().
TemplateParameterList * ASTRecordReader::readTemplateParameterList | ( | ) |
Read a template parameter list, advancing Idx.
Definition at line 8630 of file ASTReader.cpp.
References clang::TemplateParameterList::Create().
Referenced by readTemplateArgument().
|
inline |
Reads a token out of a record, advancing Idx.
Definition at line 321 of file ASTRecordReader.h.
References clang::ASTReader::ReadToken().
|
inline |
Read a type from the current position in the record.
Definition at line 173 of file ASTRecordReader.h.
References clang::ASTReader::readType().
Referenced by readQualType().
void ASTRecordReader::readTypeLoc | ( | TypeLoc | TL | ) |
Reads the location information for a type.
Definition at line 6714 of file ASTReader.cpp.
References clang::TypeLoc::getNextTypeLoc(), clang::TypeLoc::isNull(), and clang::TypeLocVisitor< ImplClass, RetTy >::Visit().
Referenced by GetLocalDeclAs().
TypeSourceInfo * ASTRecordReader::readTypeSourceInfo | ( | ) |
Reads a declarator info from the given record, advancing Idx.
Definition at line 6720 of file ASTReader.cpp.
References clang::TypeSourceInfo::getTypeLoc(), and clang::QualType::isNull().
Referenced by GetLocalDeclAs(), and clang::ASTDeclReader::VisitOMPCapturedExprDecl().
|
inline |
Read a 32-bit unsigned value; required to satisfy BasicReader.
Definition at line 290 of file ASTRecordReader.h.
References readInt().
|
inline |
Read a 64-bit unsigned value; required to satisfy BasicReader.
Definition at line 295 of file ASTRecordReader.h.
References readInt().
void ASTRecordReader::readUnresolvedSet | ( | LazyASTUnresolvedSet & | Set | ) |
Read a UnresolvedSet structure, advancing Idx.
Read a UnresolvedSet structure.
Definition at line 8659 of file ASTReader.cpp.
References clang::LazyASTUnresolvedSet::addLazyDecl(), and clang::LazyASTUnresolvedSet::reserve().
Referenced by readTemplateArgument().
|
inline |
Read a version tuple, advancing Idx.
Definition at line 310 of file ASTRecordReader.h.
References readAttr(), readAttributes(), and clang::ASTReader::ReadVersionTuple().
Referenced by clang::ASTDeclReader::VisitOMPCapturedExprDecl().
|
inline |
Read the record that describes the visible contents of a DC.
Definition at line 101 of file ASTRecordReader.h.
References clang::serialization::ModuleFile::DeclsCursor.
|
inline |
Definition at line 325 of file ASTRecordReader.h.
References clang::ASTReader::RecordSwitchCaseID().
|
inline |
The length of this record.
Definition at line 59 of file ASTRecordReader.h.
|
inline |
Skips the specified number of values.
Definition at line 81 of file ASTRecordReader.h.