clang  13.0.0git
ASTRecordWriter.h
Go to the documentation of this file.
1 //===- ASTRecordWriter.h - Helper classes for writing 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 the ASTRecordWriter class, a helper class useful
10 // when serializing AST.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_SERIALIZATION_ASTRECORDWRITER_H
15 #define LLVM_CLANG_SERIALIZATION_ASTRECORDWRITER_H
16 
18 #include "clang/AST/OpenMPClause.h"
20 
21 namespace clang {
22 
23 class TypeLoc;
24 
25 /// An object for streaming information to a record.
27  : public serialization::DataStreamBasicWriter<ASTRecordWriter> {
28  ASTWriter *Writer;
30 
31  /// Statements that we've encountered while serializing a
32  /// declaration or type.
33  SmallVector<Stmt *, 16> StmtsToEmit;
34 
35  /// Indices of record elements that describe offsets within the
36  /// bitcode. These will be converted to offsets relative to the current
37  /// record when emitted.
38  SmallVector<unsigned, 8> OffsetIndices;
39 
40  /// Flush all of the statements and expressions that have
41  /// been added to the queue via AddStmt().
42  void FlushStmts();
43  void FlushSubStmts();
44 
45  void PrepareToEmit(uint64_t MyOffset) {
46  // Convert offsets into relative form.
47  for (unsigned I : OffsetIndices) {
48  auto &StoredOffset = (*Record)[I];
49  assert(StoredOffset < MyOffset && "invalid offset");
50  if (StoredOffset)
51  StoredOffset = MyOffset - StoredOffset;
52  }
53  OffsetIndices.clear();
54  }
55 
56 public:
57  /// Construct a ASTRecordWriter that uses the default encoding scheme.
59  : DataStreamBasicWriter(W.getASTContext()), Writer(&W), Record(&Record) {}
60 
61  /// Construct a ASTRecordWriter that uses the same encoding scheme as another
62  /// ASTRecordWriter.
64  : DataStreamBasicWriter(Parent.getASTContext()), Writer(Parent.Writer),
65  Record(&Record) {}
66 
67  /// Copying an ASTRecordWriter is almost certainly a bug.
68  ASTRecordWriter(const ASTRecordWriter &) = delete;
69  ASTRecordWriter &operator=(const ASTRecordWriter &) = delete;
70 
71  /// Extract the underlying record storage.
72  ASTWriter::RecordDataImpl &getRecordData() const { return *Record; }
73 
74  /// Minimal vector-like interface.
75  /// @{
76  void push_back(uint64_t N) { Record->push_back(N); }
77  template<typename InputIterator>
78  void append(InputIterator begin, InputIterator end) {
79  Record->append(begin, end);
80  }
81  bool empty() const { return Record->empty(); }
82  size_t size() const { return Record->size(); }
83  uint64_t &operator[](size_t N) { return (*Record)[N]; }
84  /// @}
85 
86  /// Emit the record to the stream, followed by its substatements, and
87  /// return its offset.
88  // FIXME: Allow record producers to suggest Abbrevs.
89  uint64_t Emit(unsigned Code, unsigned Abbrev = 0) {
90  uint64_t Offset = Writer->Stream.GetCurrentBitNo();
91  PrepareToEmit(Offset);
92  Writer->Stream.EmitRecord(Code, *Record, Abbrev);
93  FlushStmts();
94  return Offset;
95  }
96 
97  /// Emit the record to the stream, preceded by its substatements.
98  uint64_t EmitStmt(unsigned Code, unsigned Abbrev = 0) {
99  FlushSubStmts();
100  PrepareToEmit(Writer->Stream.GetCurrentBitNo());
101  Writer->Stream.EmitRecord(Code, *Record, Abbrev);
102  return Writer->Stream.GetCurrentBitNo();
103  }
104 
105  /// Add a bit offset into the record. This will be converted into an
106  /// offset relative to the current record when emitted.
107  void AddOffset(uint64_t BitOffset) {
108  OffsetIndices.push_back(Record->size());
109  Record->push_back(BitOffset);
110  }
111 
112  /// Add the given statement or expression to the queue of
113  /// statements to emit.
114  ///
115  /// This routine should be used when emitting types and declarations
116  /// that have expressions as part of their formulation. Once the
117  /// type or declaration has been written, Emit() will write
118  /// the corresponding statements just after the record.
119  void AddStmt(Stmt *S) {
120  StmtsToEmit.push_back(S);
121  }
122  void writeStmtRef(const Stmt *S) {
123  AddStmt(const_cast<Stmt*>(S));
124  }
125 
126  /// Add a definition for the given function to the queue of statements
127  /// to emit.
128  void AddFunctionDefinition(const FunctionDecl *FD);
129 
130  /// Emit a source location.
132  return Writer->AddSourceLocation(Loc, *Record);
133  }
135  AddSourceLocation(Loc);
136  }
137 
138  /// Emit a source range.
140  return Writer->AddSourceRange(Range, *Record);
141  }
142 
143  void writeBool(bool Value) {
144  Record->push_back(Value);
145  }
146 
147  void writeUInt32(uint32_t Value) {
148  Record->push_back(Value);
149  }
150 
151  void writeUInt64(uint64_t Value) {
152  Record->push_back(Value);
153  }
154 
155  /// Emit an integral value.
156  void AddAPInt(const llvm::APInt &Value) {
157  writeAPInt(Value);
158  }
159 
160  /// Emit a signed integral value.
161  void AddAPSInt(const llvm::APSInt &Value) {
163  }
164 
165  /// Emit a floating-point value.
166  void AddAPFloat(const llvm::APFloat &Value);
167 
168  /// Emit an APvalue.
169  void AddAPValue(const APValue &Value) { writeAPValue(Value); }
170 
171  /// Emit a reference to an identifier.
173  return Writer->AddIdentifierRef(II, *Record);
174  }
175  void writeIdentifier(const IdentifierInfo *II) {
176  AddIdentifierRef(II);
177  }
178 
179  /// Emit a Selector (which is a smart pointer reference).
180  void AddSelectorRef(Selector S);
182  AddSelectorRef(sel);
183  }
184 
185  /// Emit a CXXTemporary.
186  void AddCXXTemporary(const CXXTemporary *Temp);
187 
188  /// Emit a C++ base specifier.
190 
191  /// Emit a set of C++ base specifiers.
193 
194  /// Emit a reference to a type.
196  return Writer->AddTypeRef(T, *Record);
197  }
199  AddTypeRef(T);
200  }
201 
202  /// Emits a reference to a declarator info.
203  void AddTypeSourceInfo(TypeSourceInfo *TInfo);
204 
205  /// Emits source location information for a type. Does not emit the type.
206  void AddTypeLoc(TypeLoc TL);
207 
208  /// Emits a template argument location info.
210  const TemplateArgumentLocInfo &Arg);
211 
212  /// Emits a template argument location.
214 
215  /// Emits an AST template argument list info.
217  const ASTTemplateArgumentListInfo *ASTTemplArgList);
218 
219  /// Emit a reference to a declaration.
220  void AddDeclRef(const Decl *D) {
221  return Writer->AddDeclRef(D, *Record);
222  }
223  void writeDeclRef(const Decl *D) {
224  AddDeclRef(D);
225  }
226 
227  /// Emit a declaration name.
229  writeDeclarationName(Name);
230  }
231 
232  void AddDeclarationNameLoc(const DeclarationNameLoc &DNLoc,
233  DeclarationName Name);
234  void AddDeclarationNameInfo(const DeclarationNameInfo &NameInfo);
235 
236  void AddQualifierInfo(const QualifierInfo &Info);
237 
238  /// Emit a nested name specifier.
241  }
242 
243  /// Emit a nested name specifier with source-location information.
245 
246  /// Emit a template name.
248  writeTemplateName(Name);
249  }
250 
251  /// Emit a template argument.
253  writeTemplateArgument(Arg);
254  }
255 
256  /// Emit a template parameter list.
257  void AddTemplateParameterList(const TemplateParameterList *TemplateParams);
258 
259  /// Emit a template argument list.
260  void AddTemplateArgumentList(const TemplateArgumentList *TemplateArgs);
261 
262  /// Emit a UnresolvedSet structure.
263  void AddUnresolvedSet(const ASTUnresolvedSet &Set);
264 
265  /// Emit a CXXCtorInitializer array.
267 
268  void AddCXXDefinitionData(const CXXRecordDecl *D);
269 
270  /// Emit information about the initializer of a VarDecl.
271  void AddVarDeclInit(const VarDecl *VD);
272 
273  /// Write an OMPTraitInfo object.
274  void writeOMPTraitInfo(const OMPTraitInfo *TI);
275 
276  void writeOMPClause(OMPClause *C);
277 
278  /// Writes data related to the OpenMP directives.
279  void writeOMPChildren(OMPChildren *Data);
280 
281  /// Emit a string.
282  void AddString(StringRef Str) {
283  return Writer->AddString(Str, *Record);
284  }
285 
286  /// Emit a path.
287  void AddPath(StringRef Path) {
288  return Writer->AddPath(Path, *Record);
289  }
290 
291  /// Emit a version tuple.
292  void AddVersionTuple(const VersionTuple &Version) {
293  return Writer->AddVersionTuple(Version, *Record);
294  }
295 
296  // Emit an attribute.
297  void AddAttr(const Attr *A);
298 
299  /// Emit a list of attributes.
301 };
302 
303 } // end namespace clang
304 
305 #endif
clang::ASTRecordWriter::AddTemplateName
void AddTemplateName(TemplateName Name)
Emit a template name.
Definition: ASTRecordWriter.h:247
clang::ASTRecordWriter::AddFunctionDefinition
void AddFunctionDefinition(const FunctionDecl *FD)
Add a definition for the given function to the queue of statements to emit.
Definition: ASTWriterDecl.cpp:2457
clang::interp::APInt
llvm::APInt APInt
Definition: Integral.h:27
clang::DeclarationNameLoc
DeclarationNameLoc - Additional source/type location info for a declaration name.
Definition: DeclarationName.h:650
clang::ASTRecordWriter::AddASTTemplateArgumentListInfo
void AddASTTemplateArgumentListInfo(const ASTTemplateArgumentListInfo *ASTTemplArgList)
Emits an AST template argument list info.
Definition: ASTWriter.cpp:5444
clang::SourceRange
A trivial tuple used to represent a source range.
Definition: SourceLocation.h:212
llvm::SmallVector
Definition: LLVM.h:38
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:88
clang::ASTRecordWriter::AddIdentifierRef
void AddIdentifierRef(const IdentifierInfo *II)
Emit a reference to an identifier.
Definition: ASTRecordWriter.h:172
clang::ASTRecordWriter::operator=
ASTRecordWriter & operator=(const ASTRecordWriter &)=delete
clang::ASTRecordWriter::AddCXXCtorInitializers
void AddCXXCtorInitializers(ArrayRef< CXXCtorInitializer * > CtorInits)
Emit a CXXCtorInitializer array.
Definition: ASTWriter.cpp:5529
clang::ASTRecordWriter::push_back
void push_back(uint64_t N)
Minimal vector-like interface.
Definition: ASTRecordWriter.h:76
clang::OMPTraitInfo
Helper data structure representing the traits in a match clause of an declare variant or metadirectiv...
Definition: OpenMPClause.h:8489
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:668
clang::NestedNameSpecifier
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
Definition: NestedNameSpecifier.h:50
clang::ASTRecordWriter::AddQualifierInfo
void AddQualifierInfo(const QualifierInfo &Info)
Definition: ASTWriter.cpp:5356
clang::ASTRecordWriter::writeIdentifier
void writeIdentifier(const IdentifierInfo *II)
Definition: ASTRecordWriter.h:175
clang::serialization::DataStreamBasicWriter
DataStreamBasicWriter provides convenience implementations for many BasicWriter methods based on the ...
Definition: AbstractBasicWriter.h:122
clang::ASTRecordWriter::writeQualType
void writeQualType(QualType T)
Definition: ASTRecordWriter.h:198
clang::ASTRecordWriter::writeOMPChildren
void writeOMPChildren(OMPChildren *Data)
Writes data related to the OpenMP directives.
Definition: ASTWriter.cpp:6713
clang::ASTRecordWriter::AddDeclarationName
void AddDeclarationName(DeclarationName Name)
Emit a declaration name.
Definition: ASTRecordWriter.h:228
clang::ASTRecordWriter::AddSourceRange
void AddSourceRange(SourceRange Range)
Emit a source range.
Definition: ASTRecordWriter.h:139
clang::ASTRecordWriter::AddAttributes
void AddAttributes(ArrayRef< const Attr * > Attrs)
Emit a list of attributes.
Definition: ASTWriter.cpp:4169
clang::ASTRecordWriter::writeOMPTraitInfo
void writeOMPTraitInfo(const OMPTraitInfo *TI)
Write an OMPTraitInfo object.
Definition: ASTWriter.cpp:6696
clang::ASTRecordWriter::AddTemplateParameterList
void AddTemplateParameterList(const TemplateParameterList *TemplateParams)
Emit a template parameter list.
Definition: ASTWriter.cpp:5417
ASTWriter.h
clang::ASTRecordWriter::AddTypeSourceInfo
void AddTypeSourceInfo(TypeSourceInfo *TInfo)
Emits a reference to a declarator info.
Definition: ASTWriter.cpp:5153
clang::ASTRecordWriter::getRecordData
ASTWriter::RecordDataImpl & getRecordData() const
Extract the underlying record storage.
Definition: ASTRecordWriter.h:72
clang::ASTRecordWriter::AddCXXBaseSpecifiers
void AddCXXBaseSpecifiers(ArrayRef< CXXBaseSpecifier > Bases)
Emit a set of C++ base specifiers.
Definition: ASTWriter.cpp:5489
clang::ASTRecordWriter::AddAPInt
void AddAPInt(const llvm::APInt &Value)
Emit an integral value.
Definition: ASTRecordWriter.h:156
clang::DeclarationName
The name of a declaration.
Definition: DeclarationName.h:145
clang::ASTRecordWriter::writeSourceLocation
void writeSourceLocation(SourceLocation Loc)
Definition: ASTRecordWriter.h:134
Offset
unsigned Offset
Definition: Format.cpp:2227
clang::ASTRecordWriter::AddPath
void AddPath(StringRef Path)
Emit a path.
Definition: ASTRecordWriter.h:287
clang::ASTRecordWriter::AddTypeRef
void AddTypeRef(QualType T)
Emit a reference to a type.
Definition: ASTRecordWriter.h:195
clang::ASTWriter::AddIdentifierRef
void AddIdentifierRef(const IdentifierInfo *II, RecordDataImpl &Record)
Emit a reference to an identifier.
Definition: ASTWriter.cpp:5043
APSInt
llvm::APSInt APSInt
Definition: ByteCodeEmitter.cpp:18
clang::ASTRecordWriter::AddStmt
void AddStmt(Stmt *S)
Add the given statement or expression to the queue of statements to emit.
Definition: ASTRecordWriter.h:119
clang::ASTRecordWriter::AddTemplateArgumentList
void AddTemplateArgumentList(const TemplateArgumentList *TemplateArgs)
Emit a template argument list.
Definition: ASTWriter.cpp:5436
clang::ASTUnresolvedSet
An UnresolvedSet-like class which uses the ASTContext's allocator.
Definition: ASTUnresolvedSet.h:29
clang::OMPChildren
Contains data for OpenMP directives: clauses, children expressions/statements (helpers for codegen) a...
Definition: OpenMPClause.h:8567
clang::OMPClause
This is a basic class for representing single OpenMP clause.
Definition: OpenMPClause.h:54
clang::ASTWriter::AddVersionTuple
void AddVersionTuple(const VersionTuple &Version, RecordDataImpl &Record)
Add a version tuple to the given record.
Definition: ASTWriter.cpp:4224
clang::ASTWriter::AddDeclRef
void AddDeclRef(const Decl *D, RecordDataImpl &Record)
Emit a reference to a declaration.
Definition: ASTWriter.cpp:5209
clang::ASTRecordWriter::AddNestedNameSpecifierLoc
void AddNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS)
Emit a nested name specifier with source-location information.
Definition: ASTWriter.cpp:5363
clang::ASTRecordWriter::AddCXXDefinitionData
void AddCXXDefinitionData(const CXXRecordDecl *D)
Definition: ASTWriter.cpp:5534
clang::ASTRecordWriter::AddDeclarationNameLoc
void AddDeclarationNameLoc(const DeclarationNameLoc &DNLoc, DeclarationName Name)
Definition: ASTWriter.cpp:5322
clang::ASTRecordWriter::AddSourceLocation
void AddSourceLocation(SourceLocation Loc)
Emit a source location.
Definition: ASTRecordWriter.h:131
clang::TemplateArgument
Represents a template argument.
Definition: TemplateBase.h:62
clang::serialization::DataStreamBasicWriter< ASTRecordWriter >::writeAPSInt
void writeAPSInt(const llvm::APSInt &value)
Definition: AbstractBasicWriter.h:156
clang::ASTRecordWriter::writeOMPClause
void writeOMPClause(OMPClause *C)
Definition: ASTWriter.cpp:6001
clang::TemplateArgumentLoc
Location wrapper for a TemplateArgument.
Definition: TemplateBase.h:458
clang::VarDecl
Represents a variable declaration or definition.
Definition: Decl.h:874
clang::ASTRecordWriter::size
size_t size() const
Definition: ASTRecordWriter.h:82
clang::TemplateParameterList
Stores a list of template parameters for a TemplateDecl and its derived classes.
Definition: DeclTemplate.h:69
clang::ASTRecordWriter::empty
bool empty() const
Definition: ASTRecordWriter.h:81
clang::CXXTemporary
Represents a C++ temporary.
Definition: ExprCXX.h:1380
clang::NestedNameSpecifierLoc
A C++ nested-name-specifier augmented with source location information.
Definition: NestedNameSpecifier.h:243
Base
clang::ASTWriter
Writes an AST file containing the contents of a translation unit.
Definition: ASTWriter.h:99
clang::ASTRecordWriter::AddUnresolvedSet
void AddUnresolvedSet(const ASTUnresolvedSet &Set)
Emit a UnresolvedSet structure.
Definition: ASTWriter.cpp:5455
clang::ASTRecordWriter::writeUInt32
void writeUInt32(uint32_t Value)
Definition: ASTRecordWriter.h:147
clang::ASTRecordWriter::AddVarDeclInit
void AddVarDeclInit(const VarDecl *VD)
Emit information about the initializer of a VarDecl.
Definition: ASTWriter.cpp:5604
clang::ASTRecordWriter::writeBool
void writeBool(bool Value)
Definition: ASTRecordWriter.h:143
clang::ASTRecordWriter::AddAPValue
void AddAPValue(const APValue &Value)
Emit an APvalue.
Definition: ASTRecordWriter.h:169
clang::ASTRecordWriter::writeStmtRef
void writeStmtRef(const Stmt *S)
Definition: ASTRecordWriter.h:122
clang::ASTRecordWriter::writeUInt64
void writeUInt64(uint64_t Value)
Definition: ASTRecordWriter.h:151
clang::ASTRecordWriter::AddCXXTemporary
void AddCXXTemporary(const CXXTemporary *Temp)
Emit a CXXTemporary.
Definition: ASTWriter.cpp:5108
clang::CXXRecordDecl
Represents a C++ struct/union/class.
Definition: DeclCXX.h:255
clang::serialization::DataStreamBasicWriter< ASTRecordWriter >::writeAPInt
void writeAPInt(const llvm::APInt &value)
Definition: AbstractBasicWriter.h:161
clang::ASTRecordWriter::AddSelectorRef
void AddSelectorRef(Selector S)
Emit a Selector (which is a smart pointer reference).
Definition: ASTWriter.cpp:5085
clang::ASTRecordWriter::append
void append(InputIterator begin, InputIterator end)
Definition: ASTRecordWriter.h:78
clang::TemplateName
Represents a C++ template name within the type system.
Definition: TemplateName.h:192
clang::ASTRecordWriter::writeDeclRef
void writeDeclRef(const Decl *D)
Definition: ASTRecordWriter.h:223
llvm::ArrayRef
Definition: LLVM.h:34
Value
Value
Definition: UninitializedValues.cpp:102
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:89
clang::ASTRecordWriter::AddDeclarationNameInfo
void AddDeclarationNameInfo(const DeclarationNameInfo &NameInfo)
Definition: ASTWriter.cpp:5349
OpenMPClause.h
clang::TypeLoc
Base wrapper for a particular "section" of type source info.
Definition: TypeLoc.h:58
clang::ASTRecordWriter::AddTemplateArgumentLocInfo
void AddTemplateArgumentLocInfo(TemplateArgument::ArgKind Kind, const TemplateArgumentLocInfo &Arg)
Emits a template argument location info.
Definition: ASTWriter.cpp:5112
clang::ASTRecordWriter::writeSelector
void writeSelector(Selector sel)
Definition: ASTRecordWriter.h:181
clang::ASTWriter::AddSourceLocation
void AddSourceLocation(SourceLocation Loc, RecordDataImpl &Record)
Emit a source location.
Definition: ASTWriter.cpp:5029
clang::ASTRecordWriter::EmitStmt
uint64_t EmitStmt(unsigned Code, unsigned Abbrev=0)
Emit the record to the stream, preceded by its substatements.
Definition: ASTRecordWriter.h:98
clang::ASTRecordWriter::AddAPFloat
void AddAPFloat(const llvm::APFloat &Value)
Emit a floating-point value.
Definition: ASTWriter.cpp:5039
clang::TemplateArgumentList
A template argument list.
Definition: DeclTemplate.h:236
clang::ASTRecordWriter
An object for streaming information to a record.
Definition: ASTRecordWriter.h:26
clang::IdentifierInfo
One of these records is kept for each identifier that is lexed.
Definition: IdentifierTable.h:67
clang::ObjCPropertyAttribute::Kind
Kind
Definition: DeclObjCCommon.h:22
clang::ASTRecordWriter::AddDeclRef
void AddDeclRef(const Decl *D)
Emit a reference to a declaration.
Definition: ASTRecordWriter.h:220
clang
Definition: CalledOnceCheck.h:17
clang::ASTRecordWriter::Emit
uint64_t Emit(unsigned Code, unsigned Abbrev=0)
Emit the record to the stream, followed by its substatements, and return its offset.
Definition: ASTRecordWriter.h:89
clang::Selector
Smart pointer class that efficiently represents Objective-C method names.
Definition: IdentifierTable.h:685
clang::ASTRecordWriter::AddTemplateArgument
void AddTemplateArgument(const TemplateArgument &Arg)
Emit a template argument.
Definition: ASTRecordWriter.h:252
clang::Stmt
Stmt - This represents one statement.
Definition: Stmt.h:68
clang::TemplateArgument::ArgKind
ArgKind
The kind of template argument we're storing.
Definition: TemplateBase.h:65
clang::ASTRecordWriter::AddCXXBaseSpecifier
void AddCXXBaseSpecifier(const CXXBaseSpecifier &Base)
Emit a C++ base specifier.
Definition: ASTWriter.cpp:5465
clang::ASTRecordWriter::ASTRecordWriter
ASTRecordWriter(ASTWriter &W, ASTWriter::RecordDataImpl &Record)
Construct a ASTRecordWriter that uses the default encoding scheme.
Definition: ASTRecordWriter.h:58
clang::ASTRecordWriter::AddTypeLoc
void AddTypeLoc(TypeLoc TL)
Emits source location information for a type. Does not emit the type.
Definition: ASTWriter.cpp:5163
clang::ASTRecordWriter::AddAttr
void AddAttr(const Attr *A)
Definition: ASTWriter.cpp:4151
clang::ASTWriter::AddTypeRef
void AddTypeRef(QualType T, RecordDataImpl &Record)
Emit a reference to a type.
Definition: ASTWriter.cpp:5169
clang::ASTRecordWriter::AddAPSInt
void AddAPSInt(const llvm::APSInt &Value)
Emit a signed integral value.
Definition: ASTRecordWriter.h:161
clang::CXXBaseSpecifier
Represents a base class of a C++ class.
Definition: DeclCXX.h:147
clang::Attr
Attr - This represents one attribute.
Definition: Attr.h:46
clang::TypeSourceInfo
A container of type source information.
Definition: Type.h:6398
clang::ASTRecordWriter::AddNestedNameSpecifier
void AddNestedNameSpecifier(NestedNameSpecifier *NNS)
Emit a nested name specifier.
Definition: ASTRecordWriter.h:239
clang::ASTWriter::AddSourceRange
void AddSourceRange(SourceRange Range, RecordDataImpl &Record)
Emit a source range.
Definition: ASTWriter.cpp:5034
clang::ASTRecordWriter::AddOffset
void AddOffset(uint64_t BitOffset)
Add a bit offset into the record.
Definition: ASTRecordWriter.h:107
Parent
NodeId Parent
Definition: ASTDiff.cpp:192
clang::APValue
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
Definition: APValue.h:122
clang::ASTTemplateArgumentListInfo
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
Definition: TemplateBase.h:613
clang::QualifierInfo
A struct with extended info about a syntactic name qualifier, to be used for the case of out-of-line ...
Definition: Decl.h:699
llvm::SmallVectorImpl
Definition: LLVM.h:39
clang::ASTWriter::AddPath
void AddPath(StringRef Path, RecordDataImpl &Record)
Add a path to the given record.
Definition: ASTWriter.cpp:4211
AbstractBasicWriter.h
clang::DeclarationNameInfo
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
Definition: DeclarationName.h:758
clang::ASTRecordWriter::ASTRecordWriter
ASTRecordWriter(ASTRecordWriter &Parent, ASTWriter::RecordDataImpl &Record)
Construct a ASTRecordWriter that uses the same encoding scheme as another ASTRecordWriter.
Definition: ASTRecordWriter.h:63
clang::FunctionDecl
Represents a function declaration or definition.
Definition: Decl.h:1854
clang::serialization::DataStreamBasicWriter< ASTRecordWriter >::DataStreamBasicWriter
DataStreamBasicWriter(ASTContext &ctx)
Definition: AbstractBasicWriter.h:125
clang::TemplateArgumentLocInfo
Location information for a TemplateArgument.
Definition: TemplateBase.h:406
clang::ASTRecordWriter::AddVersionTuple
void AddVersionTuple(const VersionTuple &Version)
Emit a version tuple.
Definition: ASTRecordWriter.h:292
clang::ASTWriter::AddString
void AddString(StringRef Str, RecordDataImpl &Record)
Add a string to the given record.
Definition: ASTWriter.cpp:4188
clang::serialization::DataStreamBasicWriter< ASTRecordWriter >::writeNestedNameSpecifier
void writeNestedNameSpecifier(NestedNameSpecifier *NNS)
Definition: AbstractBasicWriter.h:228
clang::ASTRecordWriter::AddTemplateArgumentLoc
void AddTemplateArgumentLoc(const TemplateArgumentLoc &Arg)
Emits a template argument location.
Definition: ASTWriter.cpp:5140
clang::ASTRecordWriter::AddString
void AddString(StringRef Str)
Emit a string.
Definition: ASTRecordWriter.h:282
clang::ASTRecordWriter::operator[]
uint64_t & operator[](size_t N)
Definition: ASTRecordWriter.h:83