clang 22.0.0git
ASTRecordReader.h
Go to the documentation of this file.
1//===- ASTRecordReader.h - Helper classes for reading AST -------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines classes that are useful in the implementation of
10// the ASTReader.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_SERIALIZATION_ASTRECORDREADER_H
15#define LLVM_CLANG_SERIALIZATION_ASTRECORDREADER_H
16
19#include "clang/Lex/Token.h"
22#include "llvm/ADT/APFloat.h"
23#include "llvm/ADT/APInt.h"
24#include "llvm/ADT/APSInt.h"
25
26namespace clang {
27class OpenACCClause;
28class OMPTraitInfo;
29class OMPChildren;
30
31/// An object for streaming information from a record.
33 : public serialization::DataStreamBasicReader<ASTRecordReader> {
35
36 ASTReader *Reader;
37 ModuleFile *F;
38 unsigned Idx = 0;
40
43
44public:
45 /// Construct an ASTRecordReader that uses the default encoding scheme.
47 : DataStreamBasicReader(Reader.getContext()), Reader(&Reader), F(&F) {}
48
49 /// Reads a record with id AbbrevID from Cursor, resetting the
50 /// internal state.
51 Expected<unsigned> readRecord(llvm::BitstreamCursor &Cursor,
52 unsigned AbbrevID);
53
54 /// Is this a module file for a module (rather than a PCH or similar).
55 bool isModule() const { return F->isModule(); }
56
57 /// Retrieve the AST context that this AST reader supplements.
58 ASTContext &getContext() { return Reader->getContext(); }
59
60 /// The current position in this record.
61 unsigned getIdx() const { return Idx; }
62
63 /// The length of this record.
64 size_t size() const { return Record.size(); }
65
66 /// An arbitrary index in this record.
67 const uint64_t &operator[](size_t N) { return Record[N]; }
68
69 /// Returns the last value in this record.
70 uint64_t back() { return Record.back(); }
71
72 /// Returns the current value in this record, and advances to the
73 /// next value.
74 uint64_t readInt() { return Record[Idx++]; }
75
77 auto Array = llvm::ArrayRef(Record).slice(Idx, Len);
78 Idx += Len;
79 return Array;
80 }
81
82 /// Returns the current value in this record, without advancing.
83 uint64_t peekInt() { return Record[Idx]; }
84
85 /// Skips the specified number of values.
86 void skipInts(unsigned N) { Idx += N; }
87
88 /// Retrieve the global submodule ID its local ID number.
90 getGlobalSubmoduleID(unsigned LocalID) {
91 return Reader->getGlobalSubmoduleID(*F, LocalID);
92 }
93
94 /// Retrieve the submodule that corresponds to a global submodule ID.
96 return Reader->getSubmodule(GlobalID);
97 }
98
99 /// Read the record that describes the lexical contents of a DC.
100 bool readLexicalDeclContextStorage(uint64_t Offset, DeclContext *DC) {
101 return Reader->ReadLexicalDeclContextStorage(*F, F->DeclsCursor, Offset,
102 DC);
103 }
104
106 uint64_t Kind = readInt();
107 bool HasExpr = Kind & 0x1;
108 Kind = Kind >> 1;
109 return ExplicitSpecifier(HasExpr ? readExpr() : nullptr,
110 static_cast<ExplicitSpecKind>(Kind));
111 }
112
113 /// Read information about an exception specification (inherited).
114 //FunctionProtoType::ExceptionSpecInfo
115 //readExceptionSpecInfo(SmallVectorImpl<QualType> &ExceptionStorage);
116
117 /// Get the global offset corresponding to a local offset.
118 uint64_t getGlobalBitOffset(uint64_t LocalOffset) {
119 return Reader->getGlobalBitOffset(*F, LocalOffset);
120 }
121
122 /// Reads a statement.
123 Stmt *readStmt() { return Reader->ReadStmt(*F); }
124 Stmt *readStmtRef() { return readStmt(); /* FIXME: readSubStmt? */ }
125
126 /// Reads an expression.
127 Expr *readExpr() { return Reader->ReadExpr(*F); }
128
129 /// Reads a sub-statement operand during statement reading.
130 Stmt *readSubStmt() { return Reader->ReadSubStmt(); }
131
132 /// Reads a sub-expression operand during statement reading.
133 Expr *readSubExpr() { return Reader->ReadSubExpr(); }
134
135 /// Reads a declaration with the given local ID in the given module.
136 ///
137 /// \returns The requested declaration, casted to the given return type.
138 template <typename T> T *GetLocalDeclAs(LocalDeclID LocalID) {
139 return cast_or_null<T>(Reader->GetLocalDecl(*F, LocalID));
140 }
141
142 /// Reads a TemplateArgumentLocInfo appropriate for the
143 /// given TemplateArgument kind, advancing Idx.
146
147 /// Reads a TemplateArgumentLoc, advancing Idx.
149
151
154
155 // Reads a concept reference from the given record.
157
158 /// Reads a declarator info from the given record, advancing Idx.
160
161 /// Reads the location information for a type.
162 void readTypeLoc(TypeLoc TL);
163
164 /// Map a local type ID within a given AST file to a global type ID.
166 return Reader->getGlobalTypeID(*F, LocalID);
167 }
168
171 }
172
173 /// Read a type from the current position in the record.
175 return Reader->readType(*F, Record, Idx);
176 }
178 return readType();
179 }
180
181 /// Reads a declaration ID from the given position in this record.
182 ///
183 /// \returns The declaration ID read from the record, adjusted to a global ID.
184 GlobalDeclID readDeclID() { return Reader->ReadDeclID(*F, Record, Idx); }
185
186 /// Reads a declaration from the given position in a record in the
187 /// given module, advancing Idx.
189 return Reader->ReadDecl(*F, Record, Idx);
190 }
192 return readDecl();
193 }
194
195 /// Reads a declaration from the given position in the record,
196 /// advancing Idx.
197 ///
198 /// \returns The declaration read from this location, casted to the given
199 /// result type.
200 template<typename T>
202 return Reader->ReadDeclAs<T>(*F, Record, Idx);
203 }
204
206 return Reader->readIdentifier(*F, Record, Idx);
207 }
208
209 /// Read a selector from the Record, advancing Idx.
211 return Reader->ReadSelector(*F, Record, Idx);
212 }
213
215
217
218 /// Read a declaration name, advancing Idx.
219 // DeclarationName readDeclarationName(); (inherited)
222
224
225 /// Return a nested name specifier, advancing Idx.
226 // NestedNameSpecifier readNestedNameSpecifier(); (inherited)
227
229
230 /// Read a template name, advancing Idx.
231 // TemplateName readTemplateName(); (inherited)
232
233 /// Read a template argument, advancing Idx. (inherited)
234 // TemplateArgument readTemplateArgument();
235 using DataStreamBasicReader::readTemplateArgument;
238 if (Canonicalize) {
240 }
241 return Arg;
242 }
243
244 /// Read a template parameter list, advancing Idx.
246
247 /// Read a template argument array, advancing Idx.
249 bool Canonicalize = false);
250
251 /// Read a UnresolvedSet structure, advancing Idx.
253
254 /// Read a C++ base specifier, advancing Idx.
256
257 /// Read a CXXCtorInitializer array, advancing Idx.
259
261 return Reader->ReadCXXTemporary(*F, Record, Idx);
262 }
263
264 /// Read an OMPTraitInfo object, advancing Idx.
266
267 /// Read an OpenMP clause, advancing Idx.
269
270 /// Read an OpenMP children, advancing Idx.
272
273 /// Read a list of Exprs used for a var-list.
275
276 /// Read a list of Exprs used for a int-expr-list.
278
279 /// Read an OpenACC clause, advancing Idx.
281
282 /// Read a list of OpenACC clauses into the passed SmallVector, during
283 /// statement reading.
285
286 void readOpenACCRoutineDeclAttr(OpenACCRoutineDeclAttr *A);
287
288 /// Read a source location, advancing Idx.
290 return Reader->ReadSourceLocation(*F, Record, Idx);
291 }
292
293 /// Read a source range, advancing Idx.
295 return Reader->ReadSourceRange(*F, Record, Idx);
296 }
297
298 /// Read an arbitrary constant value, advancing Idx.
299 // APValue readAPValue(); (inherited)
300
301 /// Read an integral value, advancing Idx.
302 // llvm::APInt readAPInt(); (inherited)
303
304 /// Read a signed integral value, advancing Idx.
305 // llvm::APSInt readAPSInt(); (inherited)
306
307 /// Read a floating-point value, advancing Idx.
308 llvm::APFloat readAPFloat(const llvm::fltSemantics &Sem);
309
310 /// Read a boolean value, advancing Idx.
311 bool readBool() { return readInt() != 0; }
312
313 /// Read a 32-bit unsigned value; required to satisfy BasicReader.
314 uint32_t readUInt32() {
315 return uint32_t(readInt());
316 }
317
318 /// Read a 64-bit unsigned value; required to satisfy BasicReader.
319 uint64_t readUInt64() {
320 return readInt();
321 }
322
325 }
326
327 /// Read a string, advancing Idx.
328 std::string readString() {
329 return Reader->ReadString(Record, Idx);
330 }
331
332 /// Read a path, advancing Idx.
333 std::string readPath() {
334 return Reader->ReadPath(*F, Record, Idx);
335 }
336
337 /// Read a version tuple, advancing Idx.
338 VersionTuple readVersionTuple() {
340 }
341
342 /// Reads one attribute from the current stream position, advancing Idx.
343 Attr *readAttr();
344
345 /// Reads attributes from the current stream position, advancing Idx.
346 void readAttributes(AttrVec &Attrs);
347
348 /// Read an BTFTypeTagAttr object.
349 BTFTypeTagAttr *readBTFTypeTagAttr() {
350 return cast<BTFTypeTagAttr>(readAttr());
351 }
352
353 /// Reads a token out of a record, advancing Idx.
355 return Reader->ReadToken(*F, Record, Idx);
356 }
357
358 void recordSwitchCaseID(SwitchCase *SC, unsigned ID) {
359 Reader->RecordSwitchCaseID(SC, ID);
360 }
361
362 /// Retrieve the switch-case statement with the given ID.
364 return Reader->getSwitchCaseWithID(ID);
365 }
366};
367
368/// Helper class that saves the current stream position and
369/// then restores it when destroyed.
371 explicit SavedStreamPosition(llvm::BitstreamCursor &Cursor)
372 : Cursor(Cursor), Offset(Cursor.GetCurrentBitNo()) {}
373
375 if (llvm::Error Err = Cursor.JumpToBit(Offset))
376 llvm::report_fatal_error(
377 llvm::Twine("Cursor should always be able to go back, failed: ") +
378 toString(std::move(Err)));
379 }
380
381private:
382 llvm::BitstreamCursor &Cursor;
383 uint64_t Offset;
384};
385
386} // namespace clang
387
388#endif
Defines the clang::ASTContext interface.
static char ID
Definition: Arena.cpp:183
enum clang::sema::@1840::IndirectLocalPathEntry::EntryKind Kind
llvm::MachO::Record Record
Definition: MachO.h:31
static std::string toString(const clang::SanitizerSet &Sanitizers)
Produce a string containing comma-separated names of sanitizers in Sanitizers set.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:188
TemplateArgument getCanonicalTemplateArgument(const TemplateArgument &Arg) const
Retrieve the "canonical" template argument.
Reads an AST files chain containing the contents of a translation unit.
Definition: ASTReader.h:429
SmallVectorImpl< uint64_t > RecordDataImpl
Definition: ASTReader.h:445
serialization::SubmoduleID getGlobalSubmoduleID(ModuleFile &M, unsigned LocalID) const
Retrieve the global submodule ID given a module and its local ID number.
Definition: ASTReader.cpp:9788
void RecordSwitchCaseID(SwitchCase *SC, unsigned ID)
Record that the given ID maps to the given switch-case statement.
ASTContext & getContext()
Retrieve the AST context that this AST reader supplements.
Definition: ASTReader.h:2599
Decl * ReadDecl(ModuleFile &F, const RecordDataImpl &R, unsigned &I)
Reads a declaration from the given position in a record in the given module.
Definition: ASTReader.h:2174
static std::string ReadString(const RecordDataImpl &Record, unsigned &Idx)
serialization::TypeID getGlobalTypeID(ModuleFile &F, serialization::LocalTypeID LocalID) const
Map a local type ID within a given AST file into a global type ID.
Definition: ASTReader.cpp:7958
T * ReadDeclAs(ModuleFile &F, const RecordDataImpl &R, unsigned &I)
Reads a declaration from the given position in a record in the given module.
Definition: ASTReader.h:2184
QualType readType(ModuleFile &F, const RecordData &Record, unsigned &Idx)
Read a type from the current position in the given record, which was read from the given AST file.
Definition: ASTReader.h:2114
SourceRange ReadSourceRange(ModuleFile &F, const RecordData &Record, unsigned &Idx)
Read a source range.
GlobalDeclID ReadDeclID(ModuleFile &F, const RecordDataImpl &Record, unsigned &Idx)
Reads a declaration ID from the given position in a record in the given module.
Definition: ASTReader.cpp:8447
Stmt * ReadSubStmt()
Reads a sub-statement operand during statement reading.
Definition: ASTReader.h:2554
Expr * ReadSubExpr()
Reads a sub-expression operand during statement reading.
Expr * ReadExpr(ModuleFile &F)
Reads an expression.
std::string ReadPath(ModuleFile &F, const RecordData &Record, unsigned &Idx)
Selector ReadSelector(ModuleFile &M, const RecordData &Record, unsigned &Idx)
Definition: ASTReader.h:2442
static VersionTuple ReadVersionTuple(const RecordData &Record, unsigned &Idx)
Read a version tuple.
Token ReadToken(ModuleFile &M, const RecordDataImpl &Record, unsigned &Idx)
Reads a token out of a record.
Definition: ASTReader.cpp:2079
SwitchCase * getSwitchCaseWithID(unsigned ID)
Retrieve the switch-case statement with the given ID.
Stmt * ReadStmt(ModuleFile &F)
Reads a statement.
Decl * GetLocalDecl(ModuleFile &F, LocalDeclID LocalID)
Reads a declaration with the given local ID in the given module.
Definition: ASTReader.h:2146
SourceLocation ReadSourceLocation(ModuleFile &MF, RawLocEncoding Raw) const
Read a source location from raw form.
Definition: ASTReader.h:2469
CXXTemporary * ReadCXXTemporary(ModuleFile &F, const RecordData &Record, unsigned &Idx)
Module * getSubmodule(serialization::SubmoduleID GlobalID)
Retrieve the submodule that corresponds to a global submodule ID.
Definition: ASTReader.cpp:9803
SmallVector< uint64_t, 64 > RecordData
Definition: ASTReader.h:444
IdentifierInfo * readIdentifier(ModuleFile &M, const RecordData &Record, unsigned &Idx)
Definition: ASTReader.h:2366
An object for streaming information from a record.
bool readBool()
Read a boolean value, advancing Idx.
std::string readString()
Read a string, advancing Idx.
Decl * readDecl()
Reads a declaration from the given position in a record in the given module, advancing Idx.
uint32_t readUInt32()
Read a 32-bit unsigned value; required to satisfy BasicReader.
llvm::APFloat readAPFloat(const llvm::fltSemantics &Sem)
Read an arbitrary constant value, advancing Idx.
TemplateArgumentLoc readTemplateArgumentLoc()
Reads a TemplateArgumentLoc, advancing Idx.
Definition: ASTReader.cpp:8008
SourceRange readSourceRange()
Read a source range, advancing Idx.
SourceLocation readSourceLocation()
Read a source location, advancing Idx.
ExplicitSpecifier readExplicitSpec()
uint64_t getGlobalBitOffset(uint64_t LocalOffset)
Read information about an exception specification (inherited).
void readUnresolvedSet(LazyASTUnresolvedSet &Set)
Read a UnresolvedSet structure, advancing Idx.
bool readLexicalDeclContextStorage(uint64_t Offset, DeclContext *DC)
Read the record that describes the lexical contents of a DC.
void readTemplateArgumentList(SmallVectorImpl< TemplateArgument > &TemplArgs, bool Canonicalize=false)
Read a template argument array, advancing Idx.
void readAttributes(AttrVec &Attrs)
Reads attributes from the current stream position, advancing Idx.
void readQualifierInfo(QualifierInfo &Info)
Definition: ASTReader.cpp:9981
T * GetLocalDeclAs(LocalDeclID LocalID)
Reads a declaration with the given local ID in the given module.
unsigned getIdx() const
The current position in this record.
DeclarationNameLoc readDeclarationNameLoc(DeclarationName Name)
Read a declaration name, advancing Idx.
Definition: ASTReader.cpp:9935
CXXBaseSpecifier readCXXBaseSpecifier()
Read a C++ base specifier, advancing Idx.
QualType readType()
Read a type from the current position in the record.
bool isModule() const
Is this a module file for a module (rather than a PCH or similar).
T * readDeclAs()
Reads a declaration from the given position in the record, advancing Idx.
Expected< unsigned > readRecord(llvm::BitstreamCursor &Cursor, unsigned AbbrevID)
Reads a record with id AbbrevID from Cursor, resetting the internal state.
DeclarationNameInfo readDeclarationNameInfo()
Definition: ASTReader.cpp:9960
const uint64_t & operator[](size_t N)
An arbitrary index in this record.
void readTypeLoc(TypeLoc TL)
Reads the location information for a type.
Definition: ASTReader.cpp:7606
size_t size() const
The length of this record.
IdentifierInfo * readIdentifier()
TemplateArgumentLocInfo readTemplateArgumentLocInfo(TemplateArgument::ArgKind Kind)
Reads a TemplateArgumentLocInfo appropriate for the given TemplateArgument kind, advancing Idx.
Definition: ASTReader.cpp:7979
uint64_t readUInt64()
Read a 64-bit unsigned value; required to satisfy BasicReader.
TemplateArgument readTemplateArgument(bool Canonicalize)
std::string readPath()
Read a path, advancing Idx.
ASTContext & getContext()
Retrieve the AST context that this AST reader supplements.
TypeSourceInfo * readTypeSourceInfo()
Reads a declarator info from the given record, advancing Idx.
Definition: ASTReader.cpp:7612
uint64_t peekInt()
Returns the current value in this record, without advancing.
void readTemplateArgumentListInfo(TemplateArgumentListInfo &Result)
Definition: ASTReader.cpp:8018
TypeCoupledDeclRefInfo readTypeCoupledDeclRefInfo()
Definition: ASTReader.cpp:9968
BTFTypeTagAttr * readBTFTypeTagAttr()
Read an BTFTypeTagAttr object.
void skipInts(unsigned N)
Skips the specified number of values.
GlobalDeclID readDeclID()
Reads a declaration ID from the given position in this record.
serialization::TypeID getGlobalTypeID(serialization::TypeID LocalID) const
Map a local type ID within a given AST file to a global type ID.
NestedNameSpecifierLoc readNestedNameSpecifierLoc()
Return a nested name specifier, advancing Idx.
ASTRecordReader(ASTReader &Reader, ModuleFile &F)
Construct an ASTRecordReader that uses the default encoding scheme.
ConceptReference * readConceptReference()
Definition: ASTReader.cpp:7425
SwitchCase * getSwitchCaseWithID(unsigned ID)
Retrieve the switch-case statement with the given ID.
Token readToken()
Reads a token out of a record, advancing Idx.
void recordSwitchCaseID(SwitchCase *SC, unsigned ID)
void readOMPChildren(OMPChildren *Data)
Read an OpenMP children, advancing Idx.
OMPClause * readOMPClause()
Read an OpenMP clause, advancing Idx.
void readOpenACCClauseList(MutableArrayRef< const OpenACCClause * > Clauses)
Read a list of OpenACC clauses into the passed SmallVector, during statement reading.
Selector readSelector()
Read a selector from the Record, advancing Idx.
CXXTemporary * readCXXTemporary()
OMPTraitInfo * readOMPTraitInfo()
Read an OMPTraitInfo object, advancing Idx.
TemplateParameterList * readTemplateParameterList()
Read a template parameter list, advancing Idx.
Definition: ASTReader.cpp:9994
OpenACCClause * readOpenACCClause()
Read an OpenACC clause, advancing Idx.
VersionTuple readVersionTuple()
Read a version tuple, advancing Idx.
llvm::SmallVector< Expr * > readOpenACCVarList()
Read a list of Exprs used for a var-list.
UnsignedOrNone readUnsignedOrNone()
uint64_t back()
Returns the last value in this record.
serialization::SubmoduleID getGlobalSubmoduleID(unsigned LocalID)
Retrieve the global submodule ID its local ID number.
CXXCtorInitializer ** readCXXCtorInitializers()
Read a CXXCtorInitializer array, advancing Idx.
Module * getSubmodule(serialization::SubmoduleID GlobalID)
Retrieve the submodule that corresponds to a global submodule ID.
SpirvOperand readHLSLSpirvOperand()
Definition: ASTReader.cpp:9972
Stmt * readStmt()
Reads a statement.
const ASTTemplateArgumentListInfo * readASTTemplateArgumentListInfo()
Definition: ASTReader.cpp:8028
Stmt * readSubStmt()
Reads a sub-statement operand during statement reading.
uint64_t readInt()
Returns the current value in this record, and advances to the next value.
Attr * readAttr()
Reads one attribute from the current stream position, advancing Idx.
Expr * readExpr()
Reads an expression.
void readOpenACCRoutineDeclAttr(OpenACCRoutineDeclAttr *A)
ArrayRef< uint64_t > readIntArray(unsigned Len)
llvm::SmallVector< Expr * > readOpenACCIntExprList()
Read a list of Exprs used for a int-expr-list.
Expr * readSubExpr()
Reads a sub-expression operand during statement reading.
Attr - This represents one attribute.
Definition: Attr.h:44
Represents a base class of a C++ class.
Definition: DeclCXX.h:146
Represents a C++ base or member initializer.
Definition: DeclCXX.h:2369
Represents a C++ temporary.
Definition: ExprCXX.h:1460
A reference to a concept and its template args, as it appears in the code.
Definition: ASTConcept.h:126
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1449
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:86
DeclarationNameLoc - Additional source/type location info for a declaration name.
The name of a declaration.
Store information needed for an explicit specifier.
Definition: DeclCXX.h:1924
This represents one expression.
Definition: Expr.h:112
One of these records is kept for each identifier that is lexed.
An UnresolvedSet-like class that might not have been loaded from the external AST source yet.
Describes a module or submodule.
Definition: Module.h:144
A C++ nested-name-specifier augmented with source location information.
Contains data for OpenMP directives: clauses, children expressions/statements (helpers for codegen) a...
This is a basic class for representing single OpenMP clause.
Definition: OpenMPClause.h:55
Helper data structure representing the traits in a match clause of an declare variant or metadirectiv...
This is the base type for all OpenACC Clauses.
Definition: OpenACCClause.h:27
A (possibly-)qualified type.
Definition: TypeBase.h:937
The collection of all-type qualifiers we support.
Definition: TypeBase.h:331
static Qualifiers fromOpaqueValue(uint64_t opaque)
Definition: TypeBase.h:448
Smart pointer class that efficiently represents Objective-C method names.
Encodes a location in the source.
A trivial tuple used to represent a source range.
Instances of this class represent operands to a SPIR-V type instruction.
Definition: TypeBase.h:6782
Stmt - This represents one statement.
Definition: Stmt.h:85
A convenient class for passing around template argument information.
Definition: TemplateBase.h:634
Location wrapper for a TemplateArgument.
Definition: TemplateBase.h:528
Represents a template argument.
Definition: TemplateBase.h:61
ArgKind
The kind of template argument we're storing.
Definition: TemplateBase.h:64
Stores a list of template parameters for a TemplateDecl and its derived classes.
Definition: DeclTemplate.h:74
Token - This structure provides full information about a lexed token.
Definition: Token.h:36
[BoundsSafety] Represents information of declarations referenced by the arguments of the counted_by a...
Definition: TypeBase.h:3374
Base wrapper for a particular "section" of type source info.
Definition: TypeLoc.h:59
A container of type source information.
Definition: TypeBase.h:8314
DataStreamBasicReader provides convenience implementations for many BasicReader methods based on the ...
Information about a module that has been loaded by the ASTReader.
Definition: ModuleFile.h:130
llvm::BitstreamCursor DeclsCursor
DeclsCursor - This is a cursor to the start of the DECLTYPES_BLOCK block.
Definition: ModuleFile.h:448
bool isModule() const
Is this a module file for a module (rather than a PCH or similar).
Definition: ModuleFile.h:515
uint64_t TypeID
An ID number that refers to a type in an AST file.
Definition: ASTBitCodes.h:88
uint32_t SubmoduleID
An ID number that refers to a submodule in a module file.
Definition: ASTBitCodes.h:185
The JSON file list parser is used to communicate input to InstallAPI.
@ Result
The result type of a method or function.
const FunctionProtoType * T
ExplicitSpecKind
Define the meaning of possible values of the kind in ExplicitSpecifier.
Definition: Specifiers.h:28
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
Definition: TemplateBase.h:678
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
A struct with extended info about a syntactic name qualifier, to be used for the case of out-of-line ...
Definition: Decl.h:752
Helper class that saves the current stream position and then restores it when destroyed.
SavedStreamPosition(llvm::BitstreamCursor &Cursor)
Location information for a TemplateArgument.
Definition: TemplateBase.h:480
static constexpr UnsignedOrNone fromInternalRepresentation(unsigned Rep)