14 #ifndef LLVM_CLANG_SERIALIZATION_ASTWRITER_H
15 #define LLVM_CLANG_SERIALIZATION_ASTWRITER_H
25 #include "llvm/ADT/DenseMap.h"
26 #include "llvm/ADT/DenseSet.h"
27 #include "llvm/ADT/MapVector.h"
28 #include "llvm/ADT/SetVector.h"
29 #include "llvm/ADT/SmallPtrSet.h"
30 #include "llvm/ADT/SmallVector.h"
31 #include "llvm/Bitcode/BitstreamWriter.h"
39 class BitstreamWriter;
46 class NestedNameSpecifier;
47 class CXXBaseSpecifier;
48 class CXXCtorInitializer;
52 class HeaderSearchOptions;
53 class IdentifierResolver;
54 class MacroDefinitionRecord;
57 class OpaqueValueExpr;
61 class PreprocessedEntity;
62 class PreprocessingRecord;
67 struct StoredDeclsList;
72 class ASTUnresolvedSet;
74 namespace SrcMgr {
class SLocEntry; }
105 llvm::BitstreamWriter &Stream;
120 std::string BaseDirectory;
128 bool DoneWritingDeclsAndTypes;
131 bool ASTHasCompilerErrors;
135 llvm::DenseMap<const FileEntry *, uint32_t> InputFileIDs;
140 DeclOrType(
Decl *D) : Stored(D), IsType(
false) { }
141 DeclOrType(
QualType T) : Stored(T.getAsOpaquePtr()), IsType(
true) { }
143 bool isType()
const {
return IsType; }
144 bool isDecl()
const {
return !IsType; }
146 QualType getType()
const {
147 assert(isType() &&
"Not a type!");
151 Decl *getDecl()
const {
152 assert(isDecl() &&
"Not a decl!");
153 return static_cast<Decl *
>(Stored);
162 std::queue<DeclOrType> DeclTypesToEmit;
176 llvm::DenseMap<const Decl *, serialization::DeclID> DeclIDs;
180 std::vector<serialization::DeclOffset> DeclOffsets;
183 typedef SmallVector<std::pair<unsigned, serialization::DeclID>, 64>
185 struct DeclIDInFileInfo {
186 LocDeclIDsTy DeclIDs;
189 unsigned FirstDeclIndex;
191 typedef llvm::DenseMap<FileID, DeclIDInFileInfo *> FileDeclIDsTy;
195 FileDeclIDsTy FileDeclIDs;
218 std::vector<uint32_t> TypeOffsets;
232 llvm::MapVector<const IdentifierInfo *, serialization::IdentID> IdentifierIDs;
241 llvm::DenseMap<MacroInfo *, serialization::MacroID> MacroIDs;
243 struct MacroInfoToEmitData {
244 const IdentifierInfo *Name;
249 std::vector<MacroInfoToEmitData> MacroInfosToEmit;
251 llvm::DenseMap<const IdentifierInfo *, uint64_t> IdentMacroDirectivesOffsetMap;
261 llvm::DenseMap<Stmt *, uint64_t> SubStmtEntries;
267 std::vector<uint32_t> IdentifierOffsets;
282 llvm::MapVector<Selector, serialization::SelectorID> SelectorIDs;
286 std::vector<uint32_t> SelectorOffsets;
290 llvm::DenseMap<
const MacroDefinitionRecord *,
295 llvm::DenseMap<const Decl *, unsigned> AnonymousDeclarationNumbers;
307 const Attr *Attribute;
311 DeclUpdate(
unsigned Kind) : Kind(Kind), Dcl(nullptr) {}
312 DeclUpdate(
unsigned Kind,
const Decl *Dcl) : Kind(Kind), Dcl(Dcl) {}
313 DeclUpdate(
unsigned Kind, QualType Type)
314 : Kind(Kind), Type(Type.getAsOpaquePtr()) {}
315 DeclUpdate(
unsigned Kind, SourceLocation Loc)
316 : Kind(Kind), Loc(Loc.getRawEncoding()) {}
317 DeclUpdate(
unsigned Kind,
unsigned Val)
318 : Kind(Kind), Val(Val) {}
319 DeclUpdate(
unsigned Kind, Module *M)
320 : Kind(Kind), Mod(M) {}
321 DeclUpdate(
unsigned Kind,
const Attr *Attribute)
322 : Kind(Kind), Attribute(Attribute) {}
325 const Decl *getDecl()
const {
return Dcl; }
327 SourceLocation getLoc()
const {
330 unsigned getNumber()
const {
return Val; }
331 Module *getModule()
const {
return Mod; }
332 const Attr *getAttr()
const {
return Attribute; }
335 typedef SmallVector<DeclUpdate, 1> UpdateRecord;
336 typedef llvm::MapVector<const Decl *, UpdateRecord> DeclUpdateMap;
339 DeclUpdateMap DeclUpdates;
341 typedef llvm::DenseMap<Decl *, Decl *> FirstLatestDeclMap;
344 FirstLatestDeclMap FirstLatestDecls;
357 SmallVector<uint64_t, 16> EagerlyDeserializedDecls;
370 SmallVector<const Decl *, 16> UpdatingVisibleDecls;
374 DeclsToRewriteTy DeclsToRewrite;
378 llvm::SetVector<ObjCInterfaceDecl *> ObjCClassesWithCategories;
380 struct ReplacedDeclInfo {
385 ReplacedDeclInfo() :
ID(0),
Offset(0), Loc(0) {}
388 : ID(ID), Offset(Offset), Loc(Loc.getRawEncoding()) {}
397 SmallVector<ReplacedDeclInfo, 16> ReplacedDecls;
405 SmallVector<Stmt *, 16> StmtsToEmit;
409 SmallVector<Stmt *, 16> *CollectedStmts;
412 llvm::DenseMap<SwitchCase *, unsigned> SwitchCaseIDs;
415 unsigned NumStatements;
422 unsigned NumLexicalDeclContexts;
426 unsigned NumVisibleDeclContexts;
429 SmallVector<uint32_t, 16> CXXBaseSpecifiersOffsets;
440 struct QueuedCXXBaseSpecifiers {
441 QueuedCXXBaseSpecifiers() :
ID(), Bases(), BasesEnd() { }
444 CXXBaseSpecifier
const *Bases,
445 CXXBaseSpecifier
const *BasesEnd)
446 : ID(ID), Bases(Bases), BasesEnd(BasesEnd) { }
449 CXXBaseSpecifier
const * Bases;
450 CXXBaseSpecifier
const * BasesEnd;
455 SmallVector<QueuedCXXBaseSpecifiers, 2> CXXBaseSpecifiersToWrite;
458 SmallVector<uint32_t, 16> CXXCtorInitializersOffsets;
469 struct QueuedCXXCtorInitializers {
470 QueuedCXXCtorInitializers() :
ID() {}
473 ArrayRef<CXXCtorInitializer*>
Inits)
474 : ID(ID), Inits(Inits) {}
477 ArrayRef<CXXCtorInitializer*>
Inits;
482 SmallVector<QueuedCXXCtorInitializers, 2> CXXCtorInitializersToWrite;
486 llvm::DenseMap<Module *, unsigned> SubmoduleIDs;
489 unsigned getSubmoduleID(Module *Mod);
492 void WriteSubStmt(
Stmt *
S,
493 llvm::DenseMap<Stmt *, uint64_t> &SubStmtEntries,
496 void WriteBlockInfoBlock();
497 void WriteControlBlock(Preprocessor &PP, ASTContext &Context,
498 StringRef isysroot,
const std::string &OutputFile);
499 void WriteInputFiles(SourceManager &
SourceMgr,
500 HeaderSearchOptions &HSOpts,
502 void WriteSourceManagerBlock(SourceManager &
SourceMgr,
503 const Preprocessor &PP);
504 void WritePreprocessor(
const Preprocessor &PP,
bool IsModule);
505 void WriteHeaderSearch(
const HeaderSearch &HS);
506 void WritePreprocessorDetail(PreprocessingRecord &PPRec);
507 void WriteSubmodules(Module *WritingModule);
509 void WritePragmaDiagnosticMappings(
const DiagnosticsEngine &
Diag,
511 void WriteCXXBaseSpecifiersOffsets();
512 void WriteCXXCtorInitializersOffsets();
514 unsigned TypeExtQualAbbrev;
515 unsigned TypeFunctionProtoAbbrev;
516 void WriteTypeAbbrevs();
517 void WriteType(QualType T);
519 bool isLookupResultExternal(StoredDeclsList &
Result, DeclContext *DC);
520 bool isLookupResultEntirelyExternal(StoredDeclsList &
Result, DeclContext *DC);
522 uint32_t GenerateNameLookupTable(
const DeclContext *DC,
524 uint64_t WriteDeclContextLexicalBlock(ASTContext &Context, DeclContext *DC);
525 uint64_t WriteDeclContextVisibleBlock(ASTContext &Context, DeclContext *DC);
526 void WriteTypeDeclOffsets();
527 void WriteFileDeclIDsMap();
528 void WriteComments();
529 void WriteSelectors(Sema &SemaRef);
530 void WriteReferencedSelectorsPool(Sema &SemaRef);
531 void WriteIdentifierTable(Preprocessor &PP, IdentifierResolver &IdResolver,
533 void WriteAttributes(ArrayRef<const Attr*> Attrs,
RecordDataImpl &Record);
535 void WriteDeclReplacementsBlock();
536 void WriteDeclContextVisibleUpdate(
const DeclContext *DC);
537 void WriteFPPragmaOptions(
const FPOptions &Opts);
538 void WriteOpenCLExtensions(Sema &SemaRef);
539 void WriteObjCCategories();
540 void WriteRedeclarations();
541 void WriteLateParsedTemplates(Sema &SemaRef);
542 void WriteOptimizePragmaOptions(Sema &SemaRef);
544 unsigned DeclParmVarAbbrev;
545 unsigned DeclContextLexicalAbbrev;
546 unsigned DeclContextVisibleLookupAbbrev;
547 unsigned UpdateVisibleAbbrev;
548 unsigned DeclRecordAbbrev;
549 unsigned DeclTypedefAbbrev;
550 unsigned DeclVarAbbrev;
551 unsigned DeclFieldAbbrev;
552 unsigned DeclEnumAbbrev;
553 unsigned DeclObjCIvarAbbrev;
554 unsigned DeclCXXMethodAbbrev;
556 unsigned DeclRefExprAbbrev;
557 unsigned CharacterLiteralAbbrev;
558 unsigned IntegerLiteralAbbrev;
559 unsigned ExprImplicitCastAbbrev;
561 void WriteDeclAbbrevs();
562 void WriteDecl(ASTContext &Context, Decl *D);
563 void AddFunctionDefinition(
const FunctionDecl *FD,
RecordData &Record);
565 void WriteASTCore(Sema &SemaRef,
566 StringRef isysroot,
const std::string &OutputFile,
567 Module *WritingModule);
572 ASTWriter(llvm::BitstreamWriter &Stream);
589 const std::string &OutputFile,
590 Module *WritingModule, StringRef isysroot,
591 bool hasErrors =
false);
622 CXXBaseSpecifier
const *BasesEnd,
656 const TemplateArgumentLocInfo &Arg,
665 const ASTTemplateArgumentListInfo *ASTTemplArgList,
724 const CXXCtorInitializer *
const *CtorInitializers,
725 unsigned NumCtorInitializers,
748 DeclsToRewrite.insert(D);
752 return DeclsToRewrite.count(D);
780 CollectedStmts->push_back(S);
812 return TypeExtQualAbbrev;
815 return TypeFunctionProtoAbbrev;
877 std::string OutputFile;
879 std::string isysroot;
881 std::shared_ptr<PCHBuffer> Buffer;
882 llvm::BitstreamWriter Stream;
884 bool AllowASTWithErrors;
894 std::shared_ptr<PCHBuffer> Buffer,
895 bool AllowASTWithErrors =
false);
void AddTemplateArgument(const TemplateArgument &Arg, RecordDataImpl &Record)
Emit a template argument.
unsigned getDeclParmVarAbbrev() const
unsigned getAnonymousDeclarationNumber(const NamedDecl *D)
uint64_t getMacroDirectivesOffset(const IdentifierInfo *Name)
void AddedVisibleDecl(const DeclContext *DC, const Decl *D) override
A new declaration with name has been added to a DeclContext.
static DiagnosticBuilder Diag(DiagnosticsEngine *Diags, const LangOptions &Features, FullSourceLoc TokLoc, const char *TokBegin, const char *TokRangeBegin, const char *TokRangeEnd, unsigned DiagID)
Produce a diagnostic highlighting some portion of a literal.
void EmitRecordWithPath(unsigned Abbrev, RecordDataImpl &Record, StringRef Path)
Emit the current record with the given path as a blob.
void AddDeclarationNameInfo(const DeclarationNameInfo &NameInfo, RecordDataImpl &Record)
Smart pointer class that efficiently represents Objective-C method names.
void FunctionDefinitionInstantiated(const FunctionDecl *D) override
A function template's definition was instantiated.
void AddToken(const Token &Tok, RecordDataImpl &Record)
Emit a token.
void AddAPInt(const llvm::APInt &Value, RecordDataImpl &Record)
Emit an integral value.
void AddedObjCPropertyInClassExtension(const ObjCPropertyDecl *Prop, const ObjCPropertyDecl *OrigProp, const ObjCCategoryDecl *ClassExt) override
A objc class extension redeclared or introduced a property.
unsigned getTypeExtQualAbbrev() const
void MacroDefinitionRead(serialization::PreprocessedEntityID ID, MacroDefinitionRecord *MD) override
A macro definition was read from the AST file.
uint32_t IdentID
An ID number that refers to an identifier in an AST file.
const LangOptions & getLangOpts() const
void InitializeSema(Sema &S) override
Initialize the semantic consumer with the Sema instance being used to perform semantic analysis on th...
void CompletedTagDefinition(const TagDecl *D) override
A new TagDecl definition was completed.
void ReaderInitialized(ASTReader *Reader) override
The ASTReader was initialized.
unsigned getDeclRefExprAbbrev() const
uint32_t DeclID
An ID number that refers to a declaration in an AST file.
void AddTypeSourceInfo(TypeSourceInfo *TInfo, RecordDataImpl &Record)
Emits a reference to a declarator info.
Declaration of a variable template.
void AddTemplateName(TemplateName Name, RecordDataImpl &Record)
Emit a template name.
serialization::DeclID GetDeclRef(const Decl *D)
Force a declaration to be emitted and get its ID.
void AddCXXCtorInitializersRef(ArrayRef< CXXCtorInitializer * > Inits, RecordDataImpl &Record)
Emit the ID for a CXXCtorInitializer array and register the array for later serialization.
void AddTypeRef(QualType T, RecordDataImpl &Record)
Emit a reference to a type.
serialization::MacroID getMacroRef(MacroInfo *MI, const IdentifierInfo *Name)
Get the unique number used to refer to the given macro.
void DeclarationMarkedOpenMPThreadPrivate(const Decl *D) override
A declaration is marked as OpenMP threadprivate which was not previously marked as threadprivate...
Represents a variable template specialization, which refers to a variable template with a given set o...
ASTWriter(llvm::BitstreamWriter &Stream)
Create a new precompiled header writer that outputs to the given bitstream.
void AddCXXTemporary(const CXXTemporary *Temp, RecordDataImpl &Record)
Emit a CXXTemporary.
serialization::IdentID getIdentifierRef(const IdentifierInfo *II)
Get the unique number used to refer to the given identifier.
void AddIdentifierRef(const IdentifierInfo *II, RecordDataImpl &Record)
Emit a reference to an identifier.
void AddQualifierInfo(const QualifierInfo &Info, RecordDataImpl &Record)
Represents a class template specialization, which refers to a class template with a given set of temp...
unsigned getDeclVarAbbrev() const
void AddTypeLoc(TypeLoc TL, RecordDataImpl &Record)
Emits a type with source-location information.
unsigned getDeclRecordAbbrev() const
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Record the location of a macro definition.
void RedefinedHiddenDefinition(const NamedDecl *D, Module *M) override
A definition has been made visible by being redefined locally.
void HandleTranslationUnit(ASTContext &Ctx) override
static SourceLocation getFromRawEncoding(unsigned Encoding)
Turn a raw encoding of a SourceLocation object into a real SourceLocation.
unsigned getDeclEnumAbbrev() const
void ResolvedOperatorDelete(const CXXDestructorDecl *DD, const FunctionDecl *Delete) override
A virtual destructor's operator delete has been resolved.
Describes a module or submodule.
An abstract interface that should be implemented by clients that read ASTs and then require further s...
serialization::MacroID getMacroID(MacroInfo *MI)
Determine the ID of an already-emitted macro.
uint32_t SubmoduleID
An ID number that refers to a submodule in a module file.
SmallVector< uint64_t, 64 > RecordData
void IdentifierRead(serialization::IdentID ID, IdentifierInfo *II) override
An identifier was deserialized from the AST file.
void AddSourceRange(SourceRange Range, RecordDataImpl &Record)
Emit a source range.
void AddTemplateParameterList(const TemplateParameterList *TemplateParams, RecordDataImpl &Record)
Emit a template parameter list.
void AddSelectorRef(Selector, RecordDataImpl &Record)
Emit a Selector (which is a smart pointer reference).
unsigned getDeclObjCIvarAbbrev() const
void AddTemplateArgumentLoc(const TemplateArgumentLoc &Arg, RecordDataImpl &Record)
Emits a template argument location.
void StaticDataMemberInstantiated(const VarDecl *D) override
A static data member was implicitly instantiated.
Represents an ObjC class declaration.
void AddDeclarationName(DeclarationName Name, RecordDataImpl &Record)
Emit a declaration name.
serialization::TypeID getTypeID(QualType T) const
Determine the type ID of an already-emitted type.
serialization::SubmoduleID inferSubmoduleIDFromLocation(SourceLocation Loc)
Infer the submodule ID that contains an entity at the given source location.
void WriteAST(Sema &SemaRef, const std::string &OutputFile, Module *WritingModule, StringRef isysroot, bool hasErrors=false)
Write a precompiled header for the given semantic analysis.
unsigned RecordSwitchCaseID(SwitchCase *S)
Record an ID for the given switch-case statement.
void AddedObjCCategoryToInterface(const ObjCCategoryDecl *CatD, const ObjCInterfaceDecl *IFD) override
A new objc category class was added for an interface.
void AddedAttributeToRecord(const Attr *Attr, const RecordDecl *Record) override
An attribute was added to a RecordDecl.
void SelectorRead(serialization::SelectorID ID, Selector Sel) override
A selector was read from the AST file.
void AddNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS, RecordDataImpl &Record)
Emit a nested name specifier with source-location information.
void ModuleRead(serialization::SubmoduleID ID, Module *Mod) override
A module definition was read from the AST file.
Sema - This implements semantic analysis and AST building for C.
unsigned getCharacterLiteralAbbrev() const
unsigned getSwitchCaseID(SwitchCase *S)
Retrieve the ID for the given switch-case statement.
void AddPath(StringRef Path, RecordDataImpl &Record)
Add a path to the given record.
ID
Defines the set of possible language-specific address spaces.
void AddTemplateArgumentList(const TemplateArgumentList *TemplateArgs, RecordDataImpl &Record)
Emit a template argument list.
void FlushCXXBaseSpecifiers()
Flush all of the C++ base specifier sets that have been added via AddCXXBaseSpecifiersRef().
ASTDeserializationListener * GetASTDeserializationListener() override
If the consumer is interested in entities being deserialized from AST files, it should return a point...
bool hasEmittedPCH() const
unsigned getExprImplicitCastAbbrev() const
Inits[]
Gets the list of initial values for linear variables.
Represents a C++ destructor within a class.
ArgKind
The kind of template argument we're storing.
serialization::TypeID GetOrCreateTypeID(QualType T)
Force a type to be emitted and get its ID.
An abstract interface that should be implemented by listeners that want to be notified when an AST en...
void AddString(StringRef Str, RecordDataImpl &Record)
Add a string to the given record.
void AddCXXBaseSpecifier(const CXXBaseSpecifier &Base, RecordDataImpl &Record)
Emit a C++ base specifier.
void FlushPendingAfterDecl()
Flush all pending records that are tacked onto the end of decl and decl update records.
unsigned getDeclFieldAbbrev() const
bool isRewritten(const Decl *D) const
The result type of a method or function.
void MacroRead(serialization::MacroID ID, MacroInfo *MI) override
A macro was read from the AST file.
SmallVectorImpl< char > & getPCH() const
void AddSourceLocation(SourceLocation Loc, RecordDataImpl &Record)
Emit a source location.
void AddAPSInt(const llvm::APSInt &Value, RecordDataImpl &Record)
Emit a signed integral value.
Encodes a location in the source. The SourceManager can decode this to get at the full include stack...
void AddTemplateArgumentLocInfo(TemplateArgument::ArgKind Kind, const TemplateArgumentLocInfo &Arg, RecordDataImpl &Record)
Emits a template argument location info.
TagDecl - Represents the declaration of a struct/union/class/enum.
PCHGenerator(const Preprocessor &PP, StringRef OutputFile, clang::Module *Module, StringRef isysroot, std::shared_ptr< PCHBuffer > Buffer, bool AllowASTWithErrors=false)
unsigned getIntegerLiteralAbbrev() const
void CompletedImplicitDefinition(const FunctionDecl *D) override
An implicit member got a definition.
uint32_t MacroID
An ID number that refers to a macro in an AST file.
void AddCXXDefinitionData(const CXXRecordDecl *D, RecordDataImpl &Record)
Represents one property declaration in an Objective-C interface.
void AddVersionTuple(const VersionTuple &Version, RecordDataImpl &Record)
Add a version tuple to the given record.
void AddNestedNameSpecifier(NestedNameSpecifier *NNS, RecordDataImpl &Record)
Emit a nested name specifier.
void AddDeclRef(const Decl *D, RecordDataImpl &Record)
Emit a reference to a declaration.
bool PreparePathForOutput(SmallVectorImpl< char > &Path)
Convert a path from this build process into one that is appropriate for emission in the module file...
static QualType getFromOpaquePtr(const void *Ptr)
void AddCXXBaseSpecifiersRef(CXXBaseSpecifier const *Bases, CXXBaseSpecifier const *BasesEnd, RecordDataImpl &Record)
Emit a set of C++ base specifiers to the record.
SmallVectorImpl< uint64_t > RecordDataImpl
ASTMutationListener * GetASTMutationListener() override
If the consumer is interested in entities getting modified after their initial creation, it should return a pointer to an ASTMutationListener here.
void SetIdentifierOffset(const IdentifierInfo *II, uint32_t Offset)
Note that the identifier II occurs at the given offset within the identifier table.
void AddDeclarationNameLoc(const DeclarationNameLoc &DNLoc, DeclarationName Name, RecordDataImpl &Record)
void DeducedReturnType(const FunctionDecl *FD, QualType ReturnType) override
A function's return type has been deduced.
const ASTWriter & getWriter() const
void AddASTTemplateArgumentListInfo(const ASTTemplateArgumentListInfo *ASTTemplArgList, RecordDataImpl &Record)
Emits an AST template argument list info.
unsigned getDeclCXXMethodAbbrev() const
void RewriteDecl(const Decl *D)
Reads an AST files chain containing the contents of a translation unit.
void AddUnresolvedSet(const ASTUnresolvedSet &Set, RecordDataImpl &Record)
Emit a UnresolvedSet structure.
unsigned getExistingSubmoduleID(Module *Mod) const
Retrieve a submodule ID for this module. Returns 0 If no ID has been associated with the module...
uint32_t CXXCtorInitializersID
An ID number that refers to a list of CXXCtorInitializers in an AST file.
Encapsulates the data about a macro definition (e.g. its tokens).
unsigned getTypeFunctionProtoAbbrev() const
void AddedCXXTemplateSpecialization(const ClassTemplateDecl *TD, const ClassTemplateSpecializationDecl *D) override
A template specialization (or partial one) was added to the template declaration. ...
void ResolvedExceptionSpec(const FunctionDecl *FD) override
A function's exception specification has been evaluated or instantiated.
void FlushCXXCtorInitializers()
Flush all of the C++ constructor initializer lists that have been added via AddCXXCtorInitializersRef...
serialization::SelectorID getSelectorRef(Selector Sel)
Get the unique number used to refer to the given selector.
uint32_t PreprocessedEntityID
An ID number that refers to an entity in the detailed preprocessing record.
void AddStmt(Stmt *S)
Add the given statement or expression to the queue of statements to emit.
void SetSelectorOffset(Selector Sel, uint32_t Offset)
Note that the selector Sel occurs at the given offset within the method pool/selector table...
Represents a C++ struct/union/class.
void FlushStmts()
Flush all of the statements and expressions that have been added to the queue via AddStmt()...
uint32_t SelectorID
An ID number that refers to an ObjC selector in an AST file.
void DeclarationMarkedUsed(const Decl *D) override
A declaration is marked used which was not previously marked used.
Declaration of a class template.
Writes an AST file containing the contents of a translation unit.
serialization::DeclID getDeclID(const Decl *D)
Determine the declaration ID of an already-emitted declaration.
static Decl::Kind getKind(const Decl *D)
void ClearSwitchCaseIDs()
unsigned getDeclTypedefAbbrev() const
AST and semantic-analysis consumer that generates a precompiled header from the parsed source code...
void AddCXXCtorInitializers(const CXXCtorInitializer *const *CtorInitializers, unsigned NumCtorInitializers, RecordDataImpl &Record)
Emit a CXXCtorInitializer array.
uint32_t TypeID
An ID number that refers to a type in an AST file.
uint32_t CXXBaseSpecifiersID
An ID number that refers to a set of CXXBaseSpecifiers in an AST file.
void AddedCXXImplicitMember(const CXXRecordDecl *RD, const Decl *D) override
An implicit member was added after the definition was completed.
Declaration of a template function.
A type index; the type ID with the qualifier bits removed.
Attr - This represents one attribute.
void TypeRead(serialization::TypeIdx Idx, QualType T) override
A type was deserialized from the AST file. The ID here has the qualifier bits already removed...
Engages in a tight little dance with the lexer to efficiently preprocess tokens.
void AddAPFloat(const llvm::APFloat &Value, RecordDataImpl &Record)
Emit a floating-point value.