class ASTRecordReader
Declaration
class ASTRecordReader : public DataStreamBasicReader { /* full declaration omitted */ };
Description
An object for streaming information from a record.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:31
Inherits from: DataStreamBasicReader
Member Variables
- private clang::ASTReader* Reader
- private clang::ASTRecordReader::ModuleFile* F
- private unsigned int Idx = 0
- private ASTReader::RecordData Record
Method Overview
- public ASTRecordReader(clang::ASTReader & Reader, clang::ASTRecordReader::ModuleFile & F)
- public template <typename T>T * GetLocalDeclAs(uint32_t LocalID)
- public uint64_t back()
- public clang::ASTContext & getContext()
- public uint64_t getGlobalBitOffset(uint64_t LocalOffset)
- public serialization::SubmoduleID getGlobalSubmoduleID(unsigned int LocalID)
- public serialization::TypeID getGlobalTypeID(unsigned int LocalID) const
- public unsigned int getIdx() const
- public clang::Module * getSubmodule(serialization::SubmoduleID GlobalID)
- public clang::SwitchCase * getSwitchCaseWithID(unsigned int ID)
- public bool isModule() const
- public uint64_t peekInt()
- public llvm::APFloat readAPFloat(const llvm::fltSemantics & Sem)
- public const clang::ASTTemplateArgumentListInfo * readASTTemplateArgumentListInfo()
- public clang::Attr * readAttr()
- public void readAttributes(clang::AttrVec & Attrs)
- public clang::BTFTypeTagAttr * readBTFTypeTagAttr()
- public bool readBool()
- public clang::CXXBaseSpecifier readCXXBaseSpecifier()
- public clang::CXXCtorInitializer ** readCXXCtorInitializers()
- public clang::CXXTemporary * readCXXTemporary()
- public clang::Decl * readDecl()
- public template <typename T>T * readDeclAs()
- public serialization::DeclID readDeclID()
- public clang::Decl * readDeclRef()
- public clang::DeclarationNameInfo readDeclarationNameInfo()
- public clang::DeclarationNameLoc readDeclarationNameLoc(clang::DeclarationName Name)
- public clang::ExplicitSpecifier readExplicitSpec()
- public clang::Expr * readExpr()
- public clang::IdentifierInfo * readIdentifier()
- public uint64_t readInt()
- public ArrayRef<uint64_t> readIntArray(unsigned int Len)
- public bool readLexicalDeclContextStorage(uint64_t Offset, clang::DeclContext * DC)
- public clang::NestedNameSpecifierLoc readNestedNameSpecifierLoc()
- public void readOMPChildren(clang::OMPChildren * Data)
- public clang::OMPClause * readOMPClause()
- public clang::OMPTraitInfo * readOMPTraitInfo()
- public std::string readPath()
- public clang::QualType readQualType()
- public void readQualifierInfo(clang::QualifierInfo & Info)
- public clang::Qualifiers readQualifiers()
- public Expected<unsigned int> readRecord(llvm::BitstreamCursor & Cursor, unsigned int AbbrevID)
- public clang::Selector readSelector()
- public clang::SourceLocation readSourceLocation(clang::ASTRecordReader::LocSeq * Seq = nullptr)
- public clang::SourceRange readSourceRange(clang::ASTRecordReader::LocSeq * Seq = nullptr)
- public clang::Stmt * readStmt()
- public clang::Stmt * readStmtRef()
- public std::string readString()
- public clang::Expr * readSubExpr()
- public clang::Stmt * readSubStmt()
- public clang::TemplateArgument readTemplateArgument(bool Canonicalize)
- public void readTemplateArgumentList(SmallVectorImpl<clang::TemplateArgument> & TemplArgs, bool Canonicalize = false)
- public clang::TemplateArgumentLoc readTemplateArgumentLoc()
- public clang::TemplateArgumentLocInfo readTemplateArgumentLocInfo(TemplateArgument::ArgKind Kind)
- public clang::TemplateParameterList * readTemplateParameterList()
- public clang::Token readToken()
- public clang::QualType readType()
- public void readTypeLoc(clang::TypeLoc TL, clang::ASTRecordReader::LocSeq * Seq = nullptr)
- public clang::TypeSourceInfo * readTypeSourceInfo()
- public uint32_t readUInt32()
- public uint64_t readUInt64()
- public void readUnresolvedSet(clang::LazyASTUnresolvedSet & Set)
- public llvm::VersionTuple readVersionTuple()
- public bool readVisibleDeclContextStorage(uint64_t Offset, serialization::DeclID ID)
- public void recordSwitchCaseID(clang::SwitchCase * SC, unsigned int ID)
- public size_t size() const
- public void skipInts(unsigned int N)
Methods
¶ASTRecordReader(
clang::ASTReader& Reader,
clang::ASTRecordReader::ModuleFile& F)
ASTRecordReader(
clang::ASTReader& Reader,
clang::ASTRecordReader::ModuleFile& F)
Description
Construct an ASTRecordReader that uses the default encoding scheme.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:46
Parameters
¶template <typename T>
T* GetLocalDeclAs(uint32_t LocalID)
template <typename T>
T* GetLocalDeclAs(uint32_t LocalID)
Description
Reads a declaration with the given local ID in the given module.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:146
Templates
- T
Parameters
- uint32_t LocalID
Returns
The requested declaration, casted to the given return type.
¶uint64_t back()
uint64_t back()
Description
Returns the last value in this record.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:70
¶clang::ASTContext& getContext()
clang::ASTContext& getContext()
Description
Retrieve the AST context that this AST reader supplements.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:58
¶uint64_t getGlobalBitOffset(uint64_t LocalOffset)
uint64_t getGlobalBitOffset(uint64_t LocalOffset)
Description
Get the global offset corresponding to a local offset.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:125
Parameters
- uint64_t LocalOffset
¶serialization::SubmoduleID getGlobalSubmoduleID(
unsigned int LocalID)
serialization::SubmoduleID getGlobalSubmoduleID(
unsigned int LocalID)
Description
Retrieve the global submodule ID its local ID number.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:90
Parameters
- unsigned int LocalID
¶serialization::TypeID getGlobalTypeID(
unsigned int LocalID) const
serialization::TypeID getGlobalTypeID(
unsigned int LocalID) const
Description
Map a local type ID within a given AST file to a global type ID.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:168
Parameters
- unsigned int LocalID
¶unsigned int getIdx() const
unsigned int getIdx() const
Description
The current position in this record.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:61
¶clang::Module* getSubmodule(
serialization::SubmoduleID GlobalID)
clang::Module* getSubmodule(
serialization::SubmoduleID GlobalID)
Description
Retrieve the submodule that corresponds to a global submodule ID.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:95
Parameters
- serialization::SubmoduleID GlobalID
¶clang::SwitchCase* getSwitchCaseWithID(
unsigned int ID)
clang::SwitchCase* getSwitchCaseWithID(
unsigned int ID)
Description
Retrieve the switch-case statement with the given ID.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:345
Parameters
- unsigned int ID
¶bool isModule() const
bool isModule() const
Description
Is this a module file for a module (rather than a PCH or similar).
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:55
¶uint64_t peekInt()
uint64_t peekInt()
Description
Returns the current value in this record, without advancing.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:83
¶llvm::APFloat readAPFloat(
const llvm::fltSemantics& Sem)
llvm::APFloat readAPFloat(
const llvm::fltSemantics& Sem)
Description
Read a floating-point value, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:294
Parameters
- const llvm::fltSemantics& Sem
¶const clang::ASTTemplateArgumentListInfo*
readASTTemplateArgumentListInfo()
const clang::ASTTemplateArgumentListInfo*
readASTTemplateArgumentListInfo()
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:159
¶clang::Attr* readAttr()
clang::Attr* readAttr()
Description
Reads one attribute from the current stream position, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:325
¶void readAttributes(clang::AttrVec& Attrs)
void readAttributes(clang::AttrVec& Attrs)
Description
Reads attributes from the current stream position, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:328
Parameters
- clang::AttrVec& Attrs
¶clang::BTFTypeTagAttr* readBTFTypeTagAttr()
clang::BTFTypeTagAttr* readBTFTypeTagAttr()
Description
Read an BTFTypeTagAttr object.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:331
¶bool readBool()
bool readBool()
Description
Read a boolean value, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:297
¶clang::CXXBaseSpecifier readCXXBaseSpecifier()
clang::CXXBaseSpecifier readCXXBaseSpecifier()
Description
Read a C++ base specifier, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:256
¶clang::CXXCtorInitializer**
readCXXCtorInitializers()
clang::CXXCtorInitializer**
readCXXCtorInitializers()
Description
Read a CXXCtorInitializer array, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:259
¶clang::CXXTemporary* readCXXTemporary()
clang::CXXTemporary* readCXXTemporary()
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:261
¶clang::Decl* readDecl()
clang::Decl* readDecl()
Description
Reads a declaration from the given position in a record in the given module, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:193
¶template <typename T>
T* readDeclAs()
template <typename T>
T* readDeclAs()
Description
Reads a declaration from the given position in the record, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:206
Templates
- T
Returns
The declaration read from this location, casted to the given result type.
¶serialization::DeclID readDeclID()
serialization::DeclID readDeclID()
Description
Reads a declaration ID from the given position in this record.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:187
Returns
The declaration ID read from the record, adjusted to a global ID.
¶clang::Decl* readDeclRef()
clang::Decl* readDeclRef()
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:196
¶clang::DeclarationNameInfo
readDeclarationNameInfo()
clang::DeclarationNameInfo
readDeclarationNameInfo()
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:222
¶clang::DeclarationNameLoc readDeclarationNameLoc(
clang::DeclarationName Name)
clang::DeclarationNameLoc readDeclarationNameLoc(
clang::DeclarationName Name)
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:221
Parameters
¶clang::ExplicitSpecifier readExplicitSpec()
clang::ExplicitSpecifier readExplicitSpec()
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:112
¶clang::Expr* readExpr()
clang::Expr* readExpr()
Description
Reads an expression.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:134
¶clang::IdentifierInfo* readIdentifier()
clang::IdentifierInfo* readIdentifier()
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:210
¶uint64_t readInt()
uint64_t readInt()
Description
Returns the current value in this record, and advances to the next value.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:74
¶ArrayRef<uint64_t> readIntArray(unsigned int Len)
ArrayRef<uint64_t> readIntArray(unsigned int Len)
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:76
Parameters
- unsigned int Len
¶bool readLexicalDeclContextStorage(
uint64_t Offset,
clang::DeclContext* DC)
bool readLexicalDeclContextStorage(
uint64_t Offset,
clang::DeclContext* DC)
Description
Read the record that describes the lexical contents of a DC.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:100
Parameters
- uint64_t Offset
- clang::DeclContext* DC
¶clang::NestedNameSpecifierLoc
readNestedNameSpecifierLoc()
clang::NestedNameSpecifierLoc
readNestedNameSpecifierLoc()
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:229
¶void readOMPChildren(clang::OMPChildren* Data)
void readOMPChildren(clang::OMPChildren* Data)
Description
Read an OpenMP children, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:272
Parameters
- clang::OMPChildren* Data
¶clang::OMPClause* readOMPClause()
clang::OMPClause* readOMPClause()
Description
Read an OpenMP clause, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:269
¶clang::OMPTraitInfo* readOMPTraitInfo()
clang::OMPTraitInfo* readOMPTraitInfo()
Description
Read an OMPTraitInfo object, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:266
¶std::string readPath()
std::string readPath()
Description
Read a path, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:315
¶clang::QualType readQualType()
clang::QualType readQualType()
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:180
¶void readQualifierInfo(clang::QualifierInfo& Info)
void readQualifierInfo(clang::QualifierInfo& Info)
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:224
Parameters
- clang::QualifierInfo& Info
¶clang::Qualifiers readQualifiers()
clang::Qualifiers readQualifiers()
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:172
¶Expected<unsigned int> readRecord(
llvm::BitstreamCursor& Cursor,
unsigned int AbbrevID)
Expected<unsigned int> readRecord(
llvm::BitstreamCursor& Cursor,
unsigned int AbbrevID)
Description
Reads a record with id AbbrevID from Cursor, resetting the internal state.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:51
Parameters
- llvm::BitstreamCursor& Cursor
- unsigned int AbbrevID
¶clang::Selector readSelector()
clang::Selector readSelector()
Description
Read a selector from the Record, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:215
¶clang::SourceLocation readSourceLocation(
clang::ASTRecordReader::LocSeq* Seq = nullptr)
clang::SourceLocation readSourceLocation(
clang::ASTRecordReader::LocSeq* Seq = nullptr)
Description
Read a source location, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:275
Parameters
- clang::ASTRecordReader::LocSeq* Seq = nullptr
¶clang::SourceRange readSourceRange(
clang::ASTRecordReader::LocSeq* Seq = nullptr)
clang::SourceRange readSourceRange(
clang::ASTRecordReader::LocSeq* Seq = nullptr)
Description
Read a source range, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:280
Parameters
- clang::ASTRecordReader::LocSeq* Seq = nullptr
¶clang::Stmt* readStmt()
clang::Stmt* readStmt()
Description
Reads a statement.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:130
¶clang::Stmt* readStmtRef()
clang::Stmt* readStmtRef()
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:131
¶std::string readString()
std::string readString()
Description
Read a string, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:310
¶clang::Expr* readSubExpr()
clang::Expr* readSubExpr()
Description
Reads a sub-expression operand during statement reading.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:140
¶clang::Stmt* readSubStmt()
clang::Stmt* readSubStmt()
Description
Reads a sub-statement operand during statement reading.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:137
¶clang::TemplateArgument readTemplateArgument(
bool Canonicalize)
clang::TemplateArgument readTemplateArgument(
bool Canonicalize)
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:237
Parameters
- bool Canonicalize
¶void readTemplateArgumentList(
SmallVectorImpl<clang::TemplateArgument>&
TemplArgs,
bool Canonicalize = false)
void readTemplateArgumentList(
SmallVectorImpl<clang::TemplateArgument>&
TemplArgs,
bool Canonicalize = false)
Description
Read a template argument array, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:249
Parameters
- SmallVectorImpl<clang::TemplateArgument>& TemplArgs
- bool Canonicalize = false
¶clang::TemplateArgumentLoc
readTemplateArgumentLoc()
clang::TemplateArgumentLoc
readTemplateArgumentLoc()
Description
Reads a TemplateArgumentLoc, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:156
¶clang::TemplateArgumentLocInfo
readTemplateArgumentLocInfo(
TemplateArgument::ArgKind Kind)
clang::TemplateArgumentLocInfo
readTemplateArgumentLocInfo(
TemplateArgument::ArgKind Kind)
Description
Reads a TemplateArgumentLocInfo appropriate for the given TemplateArgument kind, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:153
Parameters
- TemplateArgument::ArgKind Kind
¶clang::TemplateParameterList*
readTemplateParameterList()
clang::TemplateParameterList*
readTemplateParameterList()
Description
Read a template parameter list, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:246
¶clang::Token readToken()
clang::Token readToken()
Description
Reads a token out of a record, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:336
¶clang::QualType readType()
clang::QualType readType()
Description
Read a type from the current position in the record.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:177
¶void readTypeLoc(
clang::TypeLoc TL,
clang::ASTRecordReader::LocSeq* Seq = nullptr)
void readTypeLoc(
clang::TypeLoc TL,
clang::ASTRecordReader::LocSeq* Seq = nullptr)
Description
Reads the location information for a type.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:165
Parameters
- clang::TypeLoc TL
- clang::ASTRecordReader::LocSeq* Seq = nullptr
¶clang::TypeSourceInfo* readTypeSourceInfo()
clang::TypeSourceInfo* readTypeSourceInfo()
Description
Reads a declarator info from the given record, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:162
¶uint32_t readUInt32()
uint32_t readUInt32()
Description
Read a 32-bit unsigned value; required to satisfy BasicReader.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:300
¶uint64_t readUInt64()
uint64_t readUInt64()
Description
Read a 64-bit unsigned value; required to satisfy BasicReader.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:305
¶void readUnresolvedSet(
clang::LazyASTUnresolvedSet& Set)
void readUnresolvedSet(
clang::LazyASTUnresolvedSet& Set)
Description
Read a UnresolvedSet structure, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:253
Parameters
¶llvm::VersionTuple readVersionTuple()
llvm::VersionTuple readVersionTuple()
Description
Read a version tuple, advancing Idx.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:320
¶bool readVisibleDeclContextStorage(
uint64_t Offset,
serialization::DeclID ID)
bool readVisibleDeclContextStorage(
uint64_t Offset,
serialization::DeclID ID)
Description
Read the record that describes the visible contents of a DC.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:106
Parameters
- uint64_t Offset
- serialization::DeclID ID
¶void recordSwitchCaseID(clang::SwitchCase* SC,
unsigned int ID)
void recordSwitchCaseID(clang::SwitchCase* SC,
unsigned int ID)
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:340
Parameters
- clang::SwitchCase* SC
- unsigned int ID
¶size_t size() const
size_t size() const
Description
The length of this record.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:64
¶void skipInts(unsigned int N)
void skipInts(unsigned int N)
Description
Skips the specified number of values.
Declared at: clang/include/clang/Serialization/ASTRecordReader.h:86
Parameters
- unsigned int N