|
clang
3.8.0
|
Writes an AST file containing the contents of a translation unit. More...
#include <ASTWriter.h>
Public Types | |
| typedef SmallVector< uint64_t, 64 > | RecordData |
| typedef SmallVectorImpl< uint64_t > | RecordDataImpl |
| typedef ArrayRef< uint64_t > | RecordDataRef |
Public Member Functions | |
| ASTWriter (llvm::BitstreamWriter &Stream, ArrayRef< llvm::IntrusiveRefCntPtr< ModuleFileExtension >> Extensions, bool IncludeTimestamps=true) | |
| Create a new precompiled header writer that outputs to the given bitstream. More... | |
| ~ASTWriter () override | |
| const LangOptions & | getLangOpts () const |
| time_t | getTimestampForOutput (const FileEntry *E) const |
| Get a timestamp for output into the AST file. More... | |
| uint64_t | WriteAST (Sema &SemaRef, const std::string &OutputFile, Module *WritingModule, StringRef isysroot, bool hasErrors=false) |
| Write a precompiled header for the given semantic analysis. More... | |
| void | AddToken (const Token &Tok, RecordDataImpl &Record) |
| Emit a token. More... | |
| void | AddSourceLocation (SourceLocation Loc, RecordDataImpl &Record) |
| Emit a source location. More... | |
| void | AddSourceRange (SourceRange Range, RecordDataImpl &Record) |
| Emit a source range. More... | |
| void | AddAPInt (const llvm::APInt &Value, RecordDataImpl &Record) |
| Emit an integral value. More... | |
| void | AddAPSInt (const llvm::APSInt &Value, RecordDataImpl &Record) |
| Emit a signed integral value. More... | |
| void | AddAPFloat (const llvm::APFloat &Value, RecordDataImpl &Record) |
| Emit a floating-point value. More... | |
| void | AddIdentifierRef (const IdentifierInfo *II, RecordDataImpl &Record) |
| Emit a reference to an identifier. More... | |
| void | AddSelectorRef (Selector, RecordDataImpl &Record) |
| Emit a Selector (which is a smart pointer reference). More... | |
| void | AddCXXTemporary (const CXXTemporary *Temp, RecordDataImpl &Record) |
| Emit a CXXTemporary. More... | |
| void | AddCXXBaseSpecifiersRef (CXXBaseSpecifier const *Bases, CXXBaseSpecifier const *BasesEnd, RecordDataImpl &Record) |
| Emit a set of C++ base specifiers to the record. More... | |
| serialization::SelectorID | getSelectorRef (Selector Sel) |
| Get the unique number used to refer to the given selector. More... | |
| serialization::IdentID | getIdentifierRef (const IdentifierInfo *II) |
| Get the unique number used to refer to the given identifier. More... | |
| serialization::MacroID | getMacroRef (MacroInfo *MI, const IdentifierInfo *Name) |
| Get the unique number used to refer to the given macro. More... | |
| serialization::MacroID | getMacroID (MacroInfo *MI) |
| Determine the ID of an already-emitted macro. More... | |
| uint64_t | getMacroDirectivesOffset (const IdentifierInfo *Name) |
| void | AddTypeRef (QualType T, RecordDataImpl &Record) |
| Emit a reference to a type. More... | |
| serialization::TypeID | GetOrCreateTypeID (QualType T) |
| Force a type to be emitted and get its ID. More... | |
| serialization::TypeID | getTypeID (QualType T) const |
| Determine the type ID of an already-emitted type. More... | |
| void | AddTypeSourceInfo (TypeSourceInfo *TInfo, RecordDataImpl &Record) |
| Emits a reference to a declarator info. More... | |
| void | AddTypeLoc (TypeLoc TL, RecordDataImpl &Record) |
| Emits a type with source-location information. More... | |
| void | AddTemplateArgumentLocInfo (TemplateArgument::ArgKind Kind, const TemplateArgumentLocInfo &Arg, RecordDataImpl &Record) |
| Emits a template argument location info. More... | |
| void | AddTemplateArgumentLoc (const TemplateArgumentLoc &Arg, RecordDataImpl &Record) |
| Emits a template argument location. More... | |
| void | AddASTTemplateArgumentListInfo (const ASTTemplateArgumentListInfo *ASTTemplArgList, RecordDataImpl &Record) |
| Emits an AST template argument list info. More... | |
| const Decl * | getFirstLocalDecl (const Decl *D) |
| Find the first local declaration of a given local redeclarable decl. More... | |
| void | AddDeclRef (const Decl *D, RecordDataImpl &Record) |
| Emit a reference to a declaration. More... | |
| serialization::DeclID | GetDeclRef (const Decl *D) |
| Force a declaration to be emitted and get its ID. More... | |
| serialization::DeclID | getDeclID (const Decl *D) |
| Determine the declaration ID of an already-emitted declaration. More... | |
| void | AddDeclarationName (DeclarationName Name, RecordDataImpl &Record) |
| Emit a declaration name. More... | |
| void | AddDeclarationNameLoc (const DeclarationNameLoc &DNLoc, DeclarationName Name, RecordDataImpl &Record) |
| void | AddDeclarationNameInfo (const DeclarationNameInfo &NameInfo, RecordDataImpl &Record) |
| unsigned | getAnonymousDeclarationNumber (const NamedDecl *D) |
| void | AddQualifierInfo (const QualifierInfo &Info, RecordDataImpl &Record) |
| void | AddNestedNameSpecifier (NestedNameSpecifier *NNS, RecordDataImpl &Record) |
| Emit a nested name specifier. More... | |
| void | AddNestedNameSpecifierLoc (NestedNameSpecifierLoc NNS, RecordDataImpl &Record) |
| Emit a nested name specifier with source-location information. More... | |
| void | AddTemplateName (TemplateName Name, RecordDataImpl &Record) |
| Emit a template name. More... | |
| void | AddTemplateArgument (const TemplateArgument &Arg, RecordDataImpl &Record) |
| Emit a template argument. More... | |
| void | AddTemplateParameterList (const TemplateParameterList *TemplateParams, RecordDataImpl &Record) |
| Emit a template parameter list. More... | |
| void | AddTemplateArgumentList (const TemplateArgumentList *TemplateArgs, RecordDataImpl &Record) |
| Emit a template argument list. More... | |
| void | AddUnresolvedSet (const ASTUnresolvedSet &Set, RecordDataImpl &Record) |
| Emit a UnresolvedSet structure. More... | |
| void | AddCXXBaseSpecifier (const CXXBaseSpecifier &Base, RecordDataImpl &Record) |
| Emit a C++ base specifier. More... | |
| void | AddCXXCtorInitializersRef (ArrayRef< CXXCtorInitializer * > Inits, RecordDataImpl &Record) |
| Emit the ID for a CXXCtorInitializer array and register the array for later serialization. More... | |
| void | AddCXXCtorInitializers (const CXXCtorInitializer *const *CtorInitializers, unsigned NumCtorInitializers, RecordDataImpl &Record) |
| Emit a CXXCtorInitializer array. More... | |
| void | AddCXXDefinitionData (const CXXRecordDecl *D, RecordDataImpl &Record) |
| void | AddString (StringRef Str, RecordDataImpl &Record) |
| Add a string to the given record. More... | |
| bool | PreparePathForOutput (SmallVectorImpl< char > &Path) |
| Convert a path from this build process into one that is appropriate for emission in the module file. More... | |
| void | AddPath (StringRef Path, RecordDataImpl &Record) |
| Add a path to the given record. More... | |
| void | EmitRecordWithPath (unsigned Abbrev, RecordDataRef Record, StringRef Path) |
| Emit the current record with the given path as a blob. More... | |
| void | AddVersionTuple (const VersionTuple &Version, RecordDataImpl &Record) |
| Add a version tuple to the given record. More... | |
| serialization::SubmoduleID | inferSubmoduleIDFromLocation (SourceLocation Loc) |
| Infer the submodule ID that contains an entity at the given source location. More... | |
| unsigned | getLocalOrImportedSubmoduleID (Module *Mod) |
| Retrieve or create a submodule ID for this module, or return 0 if the submodule is neither local (a submodle of the currently-written module) nor from an imported module. More... | |
| void | SetIdentifierOffset (const IdentifierInfo *II, uint32_t Offset) |
| Note that the identifier II occurs at the given offset within the identifier table. More... | |
| void | SetSelectorOffset (Selector Sel, uint32_t Offset) |
| Note that the selector Sel occurs at the given offset within the method pool/selector table. More... | |
| void | AddStmt (Stmt *S) |
| Add the given statement or expression to the queue of statements to emit. More... | |
| void | FlushStmts () |
| Flush all of the statements and expressions that have been added to the queue via AddStmt(). More... | |
| void | FlushCXXBaseSpecifiers () |
Flush all of the C++ base specifier sets that have been added via AddCXXBaseSpecifiersRef(). More... | |
| void | FlushCXXCtorInitializers () |
Flush all of the C++ constructor initializer lists that have been added via AddCXXCtorInitializersRef(). More... | |
| void | FlushPendingAfterDecl () |
| Flush all pending records that are tacked onto the end of decl and decl update records. More... | |
| unsigned | RecordSwitchCaseID (SwitchCase *S) |
| Record an ID for the given switch-case statement. More... | |
| unsigned | getSwitchCaseID (SwitchCase *S) |
| Retrieve the ID for the given switch-case statement. More... | |
| void | ClearSwitchCaseIDs () |
| unsigned | getTypeExtQualAbbrev () const |
| unsigned | getTypeFunctionProtoAbbrev () const |
| unsigned | getDeclParmVarAbbrev () const |
| unsigned | getDeclRecordAbbrev () const |
| unsigned | getDeclTypedefAbbrev () const |
| unsigned | getDeclVarAbbrev () const |
| unsigned | getDeclFieldAbbrev () const |
| unsigned | getDeclEnumAbbrev () const |
| unsigned | getDeclObjCIvarAbbrev () const |
| unsigned | getDeclCXXMethodAbbrev () const |
| unsigned | getDeclRefExprAbbrev () const |
| unsigned | getCharacterLiteralAbbrev () const |
| unsigned | getIntegerLiteralAbbrev () const |
| unsigned | getExprImplicitCastAbbrev () const |
| bool | hasChain () const |
| ASTReader * | getChain () const |
| void | ReaderInitialized (ASTReader *Reader) override |
| The ASTReader was initialized. More... | |
| void | IdentifierRead (serialization::IdentID ID, IdentifierInfo *II) override |
| An identifier was deserialized from the AST file. More... | |
| void | MacroRead (serialization::MacroID ID, MacroInfo *MI) override |
| A macro was read from the AST file. More... | |
| void | TypeRead (serialization::TypeIdx Idx, QualType T) override |
| A type was deserialized from the AST file. More... | |
| void | SelectorRead (serialization::SelectorID ID, Selector Sel) override |
| A selector was read from the AST file. More... | |
| void | MacroDefinitionRead (serialization::PreprocessedEntityID ID, MacroDefinitionRecord *MD) override |
| A macro definition was read from the AST file. More... | |
| void | ModuleRead (serialization::SubmoduleID ID, Module *Mod) override |
| A module definition was read from the AST file. More... | |
| void | CompletedTagDefinition (const TagDecl *D) override |
| A new TagDecl definition was completed. More... | |
| void | AddedVisibleDecl (const DeclContext *DC, const Decl *D) override |
| A new declaration with name has been added to a DeclContext. More... | |
| void | AddedCXXImplicitMember (const CXXRecordDecl *RD, const Decl *D) override |
| An implicit member was added after the definition was completed. More... | |
| void | ResolvedExceptionSpec (const FunctionDecl *FD) override |
| A function's exception specification has been evaluated or instantiated. More... | |
| void | DeducedReturnType (const FunctionDecl *FD, QualType ReturnType) override |
| A function's return type has been deduced. More... | |
| void | ResolvedOperatorDelete (const CXXDestructorDecl *DD, const FunctionDecl *Delete) override |
| A virtual destructor's operator delete has been resolved. More... | |
| void | CompletedImplicitDefinition (const FunctionDecl *D) override |
| An implicit member got a definition. More... | |
| void | StaticDataMemberInstantiated (const VarDecl *D) override |
| A static data member was implicitly instantiated. More... | |
| void | DefaultArgumentInstantiated (const ParmVarDecl *D) override |
| A default argument was instantiated. More... | |
| void | FunctionDefinitionInstantiated (const FunctionDecl *D) override |
| A function template's definition was instantiated. More... | |
| void | AddedObjCCategoryToInterface (const ObjCCategoryDecl *CatD, const ObjCInterfaceDecl *IFD) override |
| A new objc category class was added for an interface. More... | |
| void | DeclarationMarkedUsed (const Decl *D) override |
| A declaration is marked used which was not previously marked used. More... | |
| void | DeclarationMarkedOpenMPThreadPrivate (const Decl *D) override |
| A declaration is marked as OpenMP threadprivate which was not previously marked as threadprivate. More... | |
| void | RedefinedHiddenDefinition (const NamedDecl *D, Module *M) override |
| A definition has been made visible by being redefined locally. More... | |
| void | AddedAttributeToRecord (const Attr *Attr, const RecordDecl *Record) override |
| An attribute was added to a RecordDecl. More... | |
Public Member Functions inherited from clang::ASTDeserializationListener | |
| virtual | ~ASTDeserializationListener () |
| virtual void | DeclRead (serialization::DeclID ID, const Decl *D) |
| A decl was deserialized from the AST file. More... | |
Public Member Functions inherited from clang::ASTMutationListener | |
| virtual | ~ASTMutationListener () |
| virtual void | AddedCXXTemplateSpecialization (const ClassTemplateDecl *TD, const ClassTemplateSpecializationDecl *D) |
| A template specialization (or partial one) was added to the template declaration. More... | |
| virtual void | AddedCXXTemplateSpecialization (const VarTemplateDecl *TD, const VarTemplateSpecializationDecl *D) |
| A template specialization (or partial one) was added to the template declaration. More... | |
| virtual void | AddedCXXTemplateSpecialization (const FunctionTemplateDecl *TD, const FunctionDecl *D) |
| A template specialization (or partial one) was added to the template declaration. More... | |
Friends | |
| class | ASTDeclWriter |
| class | ASTStmtWriter |
Writes an AST file containing the contents of a translation unit.
The ASTWriter class produces a bitstream containing the serialized representation of a given abstract syntax tree and its supporting data structures. This bitstream can be de-serialized via an instance of the ASTReader class.
Definition at line 84 of file ASTWriter.h.
| typedef SmallVector<uint64_t, 64> clang::ASTWriter::RecordData |
Definition at line 87 of file ASTWriter.h.
| typedef SmallVectorImpl<uint64_t> clang::ASTWriter::RecordDataImpl |
Definition at line 88 of file ASTWriter.h.
| typedef ArrayRef<uint64_t> clang::ASTWriter::RecordDataRef |
Definition at line 89 of file ASTWriter.h.
| ASTWriter::ASTWriter | ( | llvm::BitstreamWriter & | Stream, |
| ArrayRef< llvm::IntrusiveRefCntPtr< ModuleFileExtension >> | Extensions, | ||
| bool | IncludeTimestamps = true |
||
| ) |
Create a new precompiled header writer that outputs to the given bitstream.
Definition at line 4035 of file ASTWriter.cpp.
|
override |
Definition at line 4065 of file ASTWriter.cpp.
| void ASTWriter::AddAPFloat | ( | const llvm::APFloat & | Value, |
| RecordDataImpl & | Record | ||
| ) |
| void ASTWriter::AddAPInt | ( | const llvm::APInt & | Value, |
| RecordDataImpl & | Record | ||
| ) |
Emit an integral value.
Definition at line 4751 of file ASTWriter.cpp.
Referenced by AddAPFloat(), and AddAPSInt().
| void ASTWriter::AddAPSInt | ( | const llvm::APSInt & | Value, |
| RecordDataImpl & | Record | ||
| ) |
Emit a signed integral value.
Definition at line 4757 of file ASTWriter.cpp.
References AddAPInt().
Referenced by AddTemplateArgument().
| void ASTWriter::AddASTTemplateArgumentListInfo | ( | const ASTTemplateArgumentListInfo * | ASTTemplArgList, |
| RecordDataImpl & | Record | ||
| ) |
Emits an AST template argument list info.
Definition at line 5367 of file ASTWriter.cpp.
References AddSourceLocation(), AddTemplateArgumentLoc(), clang::ASTTemplateArgumentListInfo::getTemplateArgs(), clang::ASTTemplateArgumentListInfo::LAngleLoc, clang::ASTTemplateArgumentListInfo::NumTemplateArgs, and clang::ASTTemplateArgumentListInfo::RAngleLoc.
| void ASTWriter::AddCXXBaseSpecifier | ( | const CXXBaseSpecifier & | Base, |
| RecordDataImpl & | Record | ||
| ) |
Emit a C++ base specifier.
Definition at line 5387 of file ASTWriter.cpp.
References AddSourceLocation(), AddSourceRange(), AddTypeSourceInfo(), clang::CXXBaseSpecifier::getAccessSpecifierAsWritten(), clang::CXXBaseSpecifier::getEllipsisLoc(), clang::CXXBaseSpecifier::getInheritConstructors(), clang::CXXBaseSpecifier::getSourceRange(), clang::CXXBaseSpecifier::getTypeSourceInfo(), clang::CXXBaseSpecifier::isBaseOfClass(), clang::CXXBaseSpecifier::isPackExpansion(), and clang::CXXBaseSpecifier::isVirtual().
Referenced by FlushCXXBaseSpecifiers().
| void ASTWriter::AddCXXBaseSpecifiersRef | ( | CXXBaseSpecifier const * | Bases, |
| CXXBaseSpecifier const * | BasesEnd, | ||
| RecordDataImpl & | Record | ||
| ) |
Emit a set of C++ base specifiers to the record.
Definition at line 4843 of file ASTWriter.cpp.
Referenced by AddCXXDefinitionData().
| void ASTWriter::AddCXXCtorInitializers | ( | const CXXCtorInitializer *const * | CtorInitializers, |
| unsigned | NumCtorInitializers, | ||
| RecordDataImpl & | Record | ||
| ) |
Emit a CXXCtorInitializer array.
Definition at line 5432 of file ASTWriter.cpp.
References AddDeclRef(), AddSourceLocation(), AddStmt(), AddTypeSourceInfo(), clang::serialization::CTOR_INITIALIZER_BASE, clang::serialization::CTOR_INITIALIZER_DELEGATING, clang::serialization::CTOR_INITIALIZER_INDIRECT_MEMBER, clang::serialization::CTOR_INITIALIZER_MEMBER, clang::CXXCtorInitializer::getArrayIndex(), clang::CXXCtorInitializer::getIndirectMember(), clang::CXXCtorInitializer::getInit(), clang::CXXCtorInitializer::getLParenLoc(), clang::CXXCtorInitializer::getMember(), clang::CXXCtorInitializer::getMemberLocation(), clang::CXXCtorInitializer::getNumArrayIndices(), clang::CXXCtorInitializer::getRParenLoc(), clang::CXXCtorInitializer::getSourceOrder(), clang::CXXCtorInitializer::getTypeSourceInfo(), clang::CXXCtorInitializer::isBaseInitializer(), clang::CXXCtorInitializer::isBaseVirtual(), clang::CXXCtorInitializer::isDelegatingInitializer(), clang::CXXCtorInitializer::isMemberInitializer(), and clang::CXXCtorInitializer::isWritten().
Referenced by FlushCXXCtorInitializers().
| void ASTWriter::AddCXXCtorInitializersRef | ( | ArrayRef< CXXCtorInitializer * > | Inits, |
| RecordDataImpl & | Record | ||
| ) |
Emit the ID for a CXXCtorInitializer array and register the array for later serialization.
Definition at line 4835 of file ASTWriter.cpp.
| void ASTWriter::AddCXXDefinitionData | ( | const CXXRecordDecl * | D, |
| RecordDataImpl & | Record | ||
| ) |
Definition at line 5500 of file ASTWriter.cpp.
References AddCXXBaseSpecifiersRef(), AddDeclRef(), AddSourceLocation(), AddTypeSourceInfo(), AddUnresolvedSet(), clang::LambdaCapture::capturesVariable(), clang::LambdaCapture::getCapturedVar(), clang::LambdaCapture::getCaptureKind(), clang::LambdaCapture::getEllipsisLoc(), clang::LambdaCapture::getLocation(), I, clang::LambdaCapture::isImplicit(), clang::LambdaCapture::isPackExpansion(), clang::LCK_ByCopy, clang::LCK_ByRef, clang::LCK_This, and clang::LCK_VLAType.
| void ASTWriter::AddCXXTemporary | ( | const CXXTemporary * | Temp, |
| RecordDataImpl & | Record | ||
| ) |
Emit a CXXTemporary.
Definition at line 4831 of file ASTWriter.cpp.
References AddDeclRef(), and clang::CXXTemporary::getDestructor().
| void ASTWriter::AddDeclarationName | ( | DeclarationName | Name, |
| RecordDataImpl & | Record | ||
| ) |
Emit a declaration name.
Definition at line 5045 of file ASTWriter.cpp.
References AddIdentifierRef(), AddSelectorRef(), AddTypeRef(), clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, clang::DeclarationName::CXXUsingDirective, clang::DeclarationName::getAsIdentifierInfo(), clang::DeclarationName::getCXXLiteralIdentifier(), clang::DeclarationName::getCXXNameType(), clang::DeclarationName::getCXXOverloadedOperator(), clang::DeclarationName::getNameKind(), clang::DeclarationName::getObjCSelector(), clang::DeclarationName::Identifier, clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, and clang::DeclarationName::ObjCZeroArgSelector.
Referenced by AddDeclarationNameInfo().
| void ASTWriter::AddDeclarationNameInfo | ( | const DeclarationNameInfo & | NameInfo, |
| RecordDataImpl & | Record | ||
| ) |
Definition at line 5133 of file ASTWriter.cpp.
References AddDeclarationName(), AddDeclarationNameLoc(), AddSourceLocation(), clang::DeclarationNameInfo::getInfo(), clang::DeclarationNameInfo::getLoc(), and clang::DeclarationNameInfo::getName().
| void ASTWriter::AddDeclarationNameLoc | ( | const DeclarationNameLoc & | DNLoc, |
| DeclarationName | Name, | ||
| RecordDataImpl & | Record | ||
| ) |
Definition at line 5100 of file ASTWriter.cpp.
References AddSourceLocation(), AddTypeSourceInfo(), clang::DeclarationNameLoc::CXXOpName::BeginOpNameLoc, clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationNameLoc::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, clang::DeclarationNameLoc::CXXOperatorName, clang::DeclarationName::CXXUsingDirective, clang::DeclarationNameLoc::CXXOpName::EndOpNameLoc, clang::SourceLocation::getFromRawEncoding(), clang::DeclarationName::getNameKind(), clang::DeclarationName::Identifier, clang::DeclarationNameLoc::NamedType, clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, clang::DeclarationName::ObjCZeroArgSelector, clang::DeclarationNameLoc::CXXLitOpName::OpNameLoc, and clang::DeclarationNameLoc::NT::TInfo.
Referenced by AddDeclarationNameInfo().
| void ASTWriter::AddDeclRef | ( | const Decl * | D, |
| RecordDataImpl & | Record | ||
| ) |
Emit a reference to a declaration.
Definition at line 4955 of file ASTWriter.cpp.
References GetDeclRef().
Referenced by AddCXXCtorInitializers(), AddCXXDefinitionData(), AddCXXTemporary(), addExceptionSpec(), AddLazyVectorDecls(), AddNestedNameSpecifier(), AddNestedNameSpecifierLoc(), AddTemplateArgument(), AddTemplateName(), AddTemplateParameterList(), and AddUnresolvedSet().
|
overridevirtual |
An attribute was added to a RecordDecl.
| Attr | The attribute that was added to the Record |
| Record | The RecordDecl that got a new attribute |
Reimplemented from clang::ASTMutationListener.
Definition at line 5838 of file ASTWriter.cpp.
References clang::Decl::isFromASTFile(), and clang::serialization::UPD_ADDED_ATTR_TO_RECORD.
|
overridevirtual |
An implicit member was added after the definition was completed.
Reimplemented from clang::ASTMutationListener.
Definition at line 5717 of file ASTWriter.cpp.
References clang::TagDecl::isCompleteDefinition(), clang::Decl::isFromASTFile(), clang::Decl::isImplicit(), isImportedDeclContext(), and clang::serialization::UPD_CXX_ADDED_IMPLICIT_MEMBER.
|
overridevirtual |
A new objc category class was added for an interface.
Reimplemented from clang::ASTMutationListener.
Definition at line 5805 of file ASTWriter.cpp.
References clang::ObjCInterfaceDecl::getDefinition(), and clang::Decl::isFromASTFile().
|
overridevirtual |
A new declaration with name has been added to a DeclContext.
Reimplemented from clang::ASTMutationListener.
Definition at line 5694 of file ASTWriter.cpp.
References clang::DeclContext::decls(), clang::serialization::getDefinitiveDeclContext(), clang::DeclContext::getPrimaryContext(), clang::Decl::isFromASTFile(), and isImportedDeclContext().
| void ASTWriter::AddIdentifierRef | ( | const IdentifierInfo * | II, |
| RecordDataImpl & | Record | ||
| ) |
Emit a reference to an identifier.
Definition at line 4766 of file ASTWriter.cpp.
References getIdentifierRef().
Referenced by AddDeclarationName(), AddNestedNameSpecifier(), AddNestedNameSpecifierLoc(), and AddTemplateName().
| void ASTWriter::AddNestedNameSpecifier | ( | NestedNameSpecifier * | NNS, |
| RecordDataImpl & | Record | ||
| ) |
Emit a nested name specifier.
Definition at line 5148 of file ASTWriter.cpp.
References AddDeclRef(), AddIdentifierRef(), AddTypeRef(), clang::NestedNameSpecifier::getAsIdentifier(), clang::NestedNameSpecifier::getAsNamespace(), clang::NestedNameSpecifier::getAsNamespaceAlias(), clang::NestedNameSpecifier::getAsRecordDecl(), clang::NestedNameSpecifier::getAsType(), clang::NestedNameSpecifier::getKind(), clang::NestedNameSpecifier::getPrefix(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::Super, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
Referenced by AddTemplateName().
| void ASTWriter::AddNestedNameSpecifierLoc | ( | NestedNameSpecifierLoc | NNS, |
| RecordDataImpl & | Record | ||
| ) |
Emit a nested name specifier with source-location information.
Definition at line 5195 of file ASTWriter.cpp.
References AddDeclRef(), AddIdentifierRef(), AddSourceLocation(), AddSourceRange(), AddTypeLoc(), clang::NestedNameSpecifier::getAsIdentifier(), clang::NestedNameSpecifier::getAsNamespace(), clang::NestedNameSpecifier::getAsNamespaceAlias(), clang::NestedNameSpecifier::getAsRecordDecl(), clang::SourceRange::getEnd(), clang::NestedNameSpecifier::getKind(), clang::NestedNameSpecifierLoc::getLocalSourceRange(), clang::NestedNameSpecifierLoc::getNestedNameSpecifier(), clang::NestedNameSpecifierLoc::getPrefix(), clang::NestedNameSpecifierLoc::getTypeLoc(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::Super, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
Referenced by AddQualifierInfo(), and AddTemplateArgumentLocInfo().
| void ASTWriter::AddPath | ( | StringRef | Path, |
| RecordDataImpl & | Record | ||
| ) |
| void ASTWriter::AddQualifierInfo | ( | const QualifierInfo & | Info, |
| RecordDataImpl & | Record | ||
| ) |
Definition at line 5140 of file ASTWriter.cpp.
References AddNestedNameSpecifierLoc(), AddTemplateParameterList(), clang::QualifierInfo::NumTemplParamLists, clang::QualifierInfo::QualifierLoc, and clang::QualifierInfo::TemplParamLists.
| void ASTWriter::AddSelectorRef | ( | Selector | SelRef, |
| RecordDataImpl & | Record | ||
| ) |
Emit a Selector (which is a smart pointer reference).
Definition at line 4808 of file ASTWriter.cpp.
References getSelectorRef().
Referenced by AddDeclarationName().
| void ASTWriter::AddSourceLocation | ( | SourceLocation | Loc, |
| RecordDataImpl & | Record | ||
| ) |
Emit a source location.
Definition at line 4742 of file ASTWriter.cpp.
References clang::SourceLocation::getRawEncoding().
Referenced by AddASTTemplateArgumentListInfo(), AddCXXBaseSpecifier(), AddCXXCtorInitializers(), AddCXXDefinitionData(), AddDeclarationNameInfo(), AddDeclarationNameLoc(), AddNestedNameSpecifierLoc(), AddSourceRange(), AddTemplateArgumentLocInfo(), clang::ASTStmtWriter::AddTemplateKWAndArgsInfo(), AddTemplateParameterList(), and clang::OMPClauseWriter::writeClause().
| void ASTWriter::AddSourceRange | ( | SourceRange | Range, |
| RecordDataImpl & | Record | ||
| ) |
Emit a source range.
Definition at line 4746 of file ASTWriter.cpp.
References AddSourceLocation(), clang::SourceRange::getBegin(), and clang::SourceRange::getEnd().
Referenced by AddCXXBaseSpecifier(), and AddNestedNameSpecifierLoc().
|
inline |
Add the given statement or expression to the queue of statements to emit.
This routine should be used when emitting types and declarations that have expressions as part of their formulation. Once the type or declaration has been written, call FlushStmts() to write the corresponding statements just after the type or declaration.
Definition at line 798 of file ASTWriter.h.
Referenced by AddCXXCtorInitializers(), addExceptionSpec(), AddTemplateArgument(), and AddTemplateArgumentLocInfo().
| void ASTWriter::AddString | ( | StringRef | Str, |
| RecordDataImpl & | Record | ||
| ) |
Add a string to the given record.
Definition at line 3964 of file ASTWriter.cpp.
| void ASTWriter::AddTemplateArgument | ( | const TemplateArgument & | Arg, |
| RecordDataImpl & | Record | ||
| ) |
Emit a template argument.
Definition at line 5302 of file ASTWriter.cpp.
References AddAPSInt(), AddDeclRef(), AddStmt(), AddTemplateName(), AddTypeRef(), clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgument::getAsDecl(), clang::TemplateArgument::getAsExpr(), clang::TemplateArgument::getAsIntegral(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateArgument::getAsType(), clang::TemplateArgument::getIntegralType(), clang::TemplateArgument::getKind(), clang::TemplateArgument::getNullPtrType(), clang::TemplateArgument::getNumTemplateExpansions(), clang::TemplateArgument::getParamTypeForDecl(), clang::TemplateArgument::Integral, clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, P, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_elements(), clang::TemplateArgument::pack_size(), clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.
Referenced by AddTemplateArgumentList(), AddTemplateArgumentLoc(), and AddTemplateName().
| void ASTWriter::AddTemplateArgumentList | ( | const TemplateArgumentList * | TemplateArgs, |
| RecordDataImpl & | Record | ||
| ) |
Emit a template argument list.
Definition at line 5357 of file ASTWriter.cpp.
References AddTemplateArgument(), clang::TemplateArgumentList::get(), and clang::TemplateArgumentList::size().
| void ASTWriter::AddTemplateArgumentLoc | ( | const TemplateArgumentLoc & | Arg, |
| RecordDataImpl & | Record | ||
| ) |
Emits a template argument location.
Definition at line 4882 of file ASTWriter.cpp.
References AddTemplateArgument(), AddTemplateArgumentLocInfo(), clang::TemplateArgument::Expression, clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgument::getAsExpr(), clang::TemplateArgumentLocInfo::getAsExpr(), clang::TemplateArgument::getKind(), and clang::TemplateArgumentLoc::getLocInfo().
Referenced by AddASTTemplateArgumentListInfo(), and clang::ASTStmtWriter::AddTemplateKWAndArgsInfo().
| void ASTWriter::AddTemplateArgumentLocInfo | ( | TemplateArgument::ArgKind | Kind, |
| const TemplateArgumentLocInfo & | Arg, | ||
| RecordDataImpl & | Record | ||
| ) |
Emits a template argument location info.
Definition at line 4853 of file ASTWriter.cpp.
References AddNestedNameSpecifierLoc(), AddSourceLocation(), AddStmt(), AddTypeSourceInfo(), clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgumentLocInfo::getAsExpr(), clang::TemplateArgumentLocInfo::getAsTypeSourceInfo(), clang::TemplateArgumentLocInfo::getTemplateEllipsisLoc(), clang::TemplateArgumentLocInfo::getTemplateNameLoc(), clang::TemplateArgumentLocInfo::getTemplateQualifierLoc(), clang::TemplateArgument::Integral, clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.
Referenced by AddTemplateArgumentLoc().
| void ASTWriter::AddTemplateName | ( | TemplateName | Name, |
| RecordDataImpl & | Record | ||
| ) |
Emit a template name.
Definition at line 5249 of file ASTWriter.cpp.
References AddDeclRef(), AddIdentifierRef(), AddNestedNameSpecifier(), AddTemplateArgument(), clang::TemplateName::DependentTemplate, clang::SubstTemplateTemplateParmPackStorage::getArgumentPack(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsOverloadedTemplate(), clang::TemplateName::getAsQualifiedTemplateName(), clang::TemplateName::getAsSubstTemplateTemplateParm(), clang::TemplateName::getAsSubstTemplateTemplateParmPack(), clang::TemplateName::getAsTemplateDecl(), clang::DependentTemplateName::getIdentifier(), clang::TemplateName::getKind(), clang::DependentTemplateName::getOperator(), clang::SubstTemplateTemplateParmStorage::getParameter(), clang::SubstTemplateTemplateParmPackStorage::getParameterPack(), clang::QualifiedTemplateName::getQualifier(), clang::DependentTemplateName::getQualifier(), clang::SubstTemplateTemplateParmStorage::getReplacement(), clang::QualifiedTemplateName::getTemplateDecl(), clang::QualifiedTemplateName::hasTemplateKeyword(), clang::DependentTemplateName::isIdentifier(), clang::TemplateName::OverloadedTemplate, clang::TemplateName::QualifiedTemplate, clang::UncommonTemplateNameStorage::size(), clang::TemplateName::SubstTemplateTemplateParm, clang::TemplateName::SubstTemplateTemplateParmPack, and clang::TemplateName::Template.
Referenced by AddTemplateArgument().
| void ASTWriter::AddTemplateParameterList | ( | const TemplateParameterList * | TemplateParams, |
| RecordDataImpl & | Record | ||
| ) |
Emit a template parameter list.
Definition at line 5344 of file ASTWriter.cpp.
References AddDeclRef(), AddSourceLocation(), clang::TemplateParameterList::getLAngleLoc(), clang::TemplateParameterList::getRAngleLoc(), clang::TemplateParameterList::getTemplateLoc(), P, and clang::TemplateParameterList::size().
Referenced by AddQualifierInfo().
| void ASTWriter::AddToken | ( | const Token & | Tok, |
| RecordDataImpl & | Record | ||
| ) |
Emit a token.
Definition at line 3951 of file ASTWriter.cpp.
References clang::Token::getFlags(), clang::Token::getIdentifierInfo(), clang::Token::getKind(), clang::Token::getLength(), and clang::Token::getLocation().
| void ASTWriter::AddTypeLoc | ( | TypeLoc | TL, |
| RecordDataImpl & | Record | ||
| ) |
Emits a type with source-location information.
Definition at line 4907 of file ASTWriter.cpp.
References AddTypeRef(), clang::TypeLoc::getNextTypeLoc(), clang::TypeLoc::getType(), and clang::TypeLoc::isNull().
Referenced by AddNestedNameSpecifierLoc(), and AddTypeSourceInfo().
| void ASTWriter::AddTypeRef | ( | QualType | T, |
| RecordDataImpl & | Record | ||
| ) |
Emit a reference to a type.
Definition at line 4915 of file ASTWriter.cpp.
References GetOrCreateTypeID().
Referenced by AddDeclarationName(), addExceptionSpec(), AddNestedNameSpecifier(), AddTemplateArgument(), AddTypeLoc(), and AddTypeSourceInfo().
| void ASTWriter::AddTypeSourceInfo | ( | TypeSourceInfo * | TInfo, |
| RecordDataImpl & | Record | ||
| ) |
Emits a reference to a declarator info.
Definition at line 4897 of file ASTWriter.cpp.
References AddTypeLoc(), AddTypeRef(), and clang::TypeSourceInfo::getTypeLoc().
Referenced by AddCXXBaseSpecifier(), AddCXXCtorInitializers(), AddCXXDefinitionData(), AddDeclarationNameLoc(), and AddTemplateArgumentLocInfo().
| void ASTWriter::AddUnresolvedSet | ( | const ASTUnresolvedSet & | Set, |
| RecordDataImpl & | Record | ||
| ) |
Emit a UnresolvedSet structure.
Definition at line 5378 of file ASTWriter.cpp.
References AddDeclRef(), clang::ASTUnresolvedSet::begin(), E, clang::ASTUnresolvedSet::end(), I, and clang::ASTUnresolvedSet::size().
Referenced by AddCXXDefinitionData().
| void ASTWriter::AddVersionTuple | ( | const VersionTuple & | Version, |
| RecordDataImpl & | Record | ||
| ) |
Add a version tuple to the given record.
Definition at line 4000 of file ASTWriter.cpp.
References clang::VersionTuple::getMajor(), clang::VersionTuple::getMinor(), and clang::VersionTuple::getSubminor().
| void ASTWriter::ClearSwitchCaseIDs | ( | ) |
Definition at line 2302 of file ASTWriterStmt.cpp.
|
overridevirtual |
An implicit member got a definition.
Reimplemented from clang::ASTMutationListener.
Definition at line 5767 of file ASTWriter.cpp.
References clang::Decl::isFromASTFile(), and clang::serialization::UPD_CXX_ADDED_FUNCTION_DEFINITION.
|
overridevirtual |
A new TagDecl definition was completed.
Reimplemented from clang::ASTMutationListener.
Definition at line 5664 of file ASTWriter.cpp.
References clang::TagDecl::isCompleteDefinition(), clang::isTemplateInstantiation(), and clang::serialization::UPD_CXX_INSTANTIATED_CLASS_DEFINITION.
|
overridevirtual |
A declaration is marked as OpenMP threadprivate which was not previously marked as threadprivate.
| D | the declaration marked OpenMP threadprivate. |
Reimplemented from clang::ASTMutationListener.
Definition at line 5824 of file ASTWriter.cpp.
References clang::Decl::isFromASTFile(), and clang::serialization::UPD_DECL_MARKED_OPENMP_THREADPRIVATE.
|
overridevirtual |
A declaration is marked used which was not previously marked used.
| D | the declaration marked used |
Reimplemented from clang::ASTMutationListener.
Definition at line 5816 of file ASTWriter.cpp.
References clang::Decl::isFromASTFile(), and clang::serialization::UPD_DECL_MARKED_USED.
|
overridevirtual |
A function's return type has been deduced.
Reimplemented from clang::ASTMutationListener.
Definition at line 5748 of file ASTWriter.cpp.
References clang::serialization::UPD_CXX_DEDUCED_RETURN_TYPE.
|
overridevirtual |
A default argument was instantiated.
Reimplemented from clang::ASTMutationListener.
Definition at line 5796 of file ASTWriter.cpp.
References clang::Decl::isFromASTFile(), and clang::serialization::UPD_CXX_INSTANTIATED_DEFAULT_ARGUMENT.
| void ASTWriter::EmitRecordWithPath | ( | unsigned | Abbrev, |
| RecordDataRef | Record, | ||
| StringRef | Path | ||
| ) |
Emit the current record with the given path as a blob.
Definition at line 3993 of file ASTWriter.cpp.
References FilePath.
| void ASTWriter::FlushCXXBaseSpecifiers | ( | ) |
Flush all of the C++ base specifier sets that have been added via AddCXXBaseSpecifiersRef().
Definition at line 5400 of file ASTWriter.cpp.
References AddCXXBaseSpecifier(), clang::serialization::DECL_CXX_BASE_SPECIFIERS, FlushStmts(), and I.
Referenced by FlushPendingAfterDecl().
| void ASTWriter::FlushCXXCtorInitializers | ( | ) |
Flush all of the C++ constructor initializer lists that have been added via AddCXXCtorInitializersRef().
Definition at line 5470 of file ASTWriter.cpp.
References AddCXXCtorInitializers(), clang::serialization::DECL_CXX_CTOR_INITIALIZERS, and FlushStmts().
Referenced by FlushPendingAfterDecl().
|
inline |
Flush all pending records that are tacked onto the end of decl and decl update records.
Definition at line 816 of file ASTWriter.h.
References FlushCXXBaseSpecifiers(), FlushCXXCtorInitializers(), and FlushStmts().
| void ASTWriter::FlushStmts | ( | ) |
Flush all of the statements and expressions that have been added to the queue via AddStmt().
Flush all of the statements that have been added to the queue via AddStmt().
Definition at line 2380 of file ASTWriterStmt.cpp.
References I, and clang::serialization::STMT_STOP.
Referenced by FlushCXXBaseSpecifiers(), FlushCXXCtorInitializers(), and FlushPendingAfterDecl().
|
overridevirtual |
A function template's definition was instantiated.
Reimplemented from clang::ASTMutationListener.
Definition at line 5776 of file ASTWriter.cpp.
References clang::Decl::isFromASTFile(), and clang::serialization::UPD_CXX_ADDED_FUNCTION_DEFINITION.
Definition at line 5079 of file ASTWriter.cpp.
References clang::Decl::getLexicalDeclContext(), clang::serialization::needsAnonymousDeclarationNumber(), and clang::serialization::numberAnonymousDeclsWithin().
|
inline |
Definition at line 852 of file ASTWriter.h.
|
inline |
Definition at line 847 of file ASTWriter.h.
|
inline |
Definition at line 844 of file ASTWriter.h.
|
inline |
Definition at line 842 of file ASTWriter.h.
|
inline |
Definition at line 841 of file ASTWriter.h.
| DeclID ASTWriter::getDeclID | ( | const Decl * | D | ) |
Determine the declaration ID of an already-emitted declaration.
Definition at line 4988 of file ASTWriter.cpp.
References clang::Decl::getGlobalID(), and clang::Decl::isFromASTFile().
|
inline |
Definition at line 843 of file ASTWriter.h.
|
inline |
Definition at line 837 of file ASTWriter.h.
|
inline |
Definition at line 838 of file ASTWriter.h.
| DeclID ASTWriter::GetDeclRef | ( | const Decl * | D | ) |
Force a declaration to be emitted and get its ID.
Definition at line 4959 of file ASTWriter.cpp.
References clang::Decl::getGlobalID(), and clang::Decl::isFromASTFile().
Referenced by AddDeclRef().
|
inline |
Definition at line 846 of file ASTWriter.h.
|
inline |
Definition at line 839 of file ASTWriter.h.
|
inline |
Definition at line 840 of file ASTWriter.h.
|
inline |
Definition at line 849 of file ASTWriter.h.
Find the first local declaration of a given local redeclarable decl.
Is this a local declaration (that is, one that will be written to our AST file)? This is the case for declarations that are neither imported from another AST file nor predefined.
Definition at line 1536 of file ASTWriterDecl.cpp.
References clang::Decl::getCanonicalDecl(), clang::Decl::getPreviousDecl(), I, clang::Decl::isFromASTFile(), and clang::serialization::NUM_PREDEF_DECL_IDS.
| IdentID ASTWriter::getIdentifierRef | ( | const IdentifierInfo * | II | ) |
Get the unique number used to refer to the given identifier.
Definition at line 4770 of file ASTWriter.cpp.
Referenced by AddIdentifierRef().
|
inline |
Definition at line 848 of file ASTWriter.h.
| const LangOptions & ASTWriter::getLangOpts | ( | ) | const |
Definition at line 4069 of file ASTWriter.cpp.
References clang::ASTContext::getLangOpts().
Retrieve or create a submodule ID for this module, or return 0 if the submodule is neither local (a submodle of the currently-written module) nor from an imported module.
Definition at line 2351 of file ASTWriter.cpp.
References clang::Module::getTopLevelModule(), and clang::if().
| uint64_t ASTWriter::getMacroDirectivesOffset | ( | const IdentifierInfo * | Name | ) |
Definition at line 4804 of file ASTWriter.cpp.
Determine the ID of an already-emitted macro.
Definition at line 4796 of file ASTWriter.cpp.
References clang::MacroInfo::isBuiltinMacro().
| MacroID ASTWriter::getMacroRef | ( | MacroInfo * | MI, |
| const IdentifierInfo * | Name | ||
| ) |
Get the unique number used to refer to the given macro.
Definition at line 4780 of file ASTWriter.cpp.
References clang::MacroInfo::isBuiltinMacro(), and clang::Name.
Force a type to be emitted and get its ID.
Definition at line 4919 of file ASTWriter.cpp.
References clang::QualType::getLocalFastQualifiers(), clang::QualType::isNull(), and clang::serialization::MakeTypeID().
Referenced by AddTypeRef().
| SelectorID ASTWriter::getSelectorRef | ( | Selector | Sel | ) |
Get the unique number used to refer to the given selector.
Definition at line 4812 of file ASTWriter.cpp.
References clang::Selector::getAsOpaquePtr().
Referenced by AddSelectorRef().
| unsigned ASTWriter::getSwitchCaseID | ( | SwitchCase * | S | ) |
Retrieve the ID for the given switch-case statement.
Definition at line 2296 of file ASTWriterStmt.cpp.
References S.
| time_t ASTWriter::getTimestampForOutput | ( | const FileEntry * | E | ) | const |
Get a timestamp for output into the AST file.
The actual timestamp of the specified file may be ignored if we have been instructed to not include timestamps in the output file.
Definition at line 4074 of file ASTWriter.cpp.
References clang::FileEntry::getModificationTime().
|
inline |
Definition at line 830 of file ASTWriter.h.
|
inline |
Definition at line 833 of file ASTWriter.h.
Determine the type ID of an already-emitted type.
Definition at line 4942 of file ASTWriter.cpp.
References clang::QualType::getLocalFastQualifiers(), I, clang::QualType::isNull(), and clang::serialization::MakeTypeID().
|
inline |
Definition at line 851 of file ASTWriter.h.
|
overridevirtual |
An identifier was deserialized from the AST file.
Reimplemented from clang::ASTDeserializationListener.
Definition at line 5621 of file ASTWriter.cpp.
| serialization::SubmoduleID ASTWriter::inferSubmoduleIDFromLocation | ( | SourceLocation | Loc | ) |
Infer the submodule ID that contains an entity at the given source location.
Definition at line 2605 of file ASTWriter.cpp.
References clang::Preprocessor::getHeaderSearchInfo(), clang::HeaderSearch::getModuleMap(), clang::Preprocessor::getSourceManager(), clang::ModuleMap::inferModuleFromLocation(), clang::SourceLocation::isInvalid(), and clang::Module::isSubModuleOf().
|
overridevirtual |
A macro definition was read from the AST file.
Reimplemented from clang::ASTDeserializationListener.
Definition at line 5653 of file ASTWriter.cpp.
|
overridevirtual |
A macro was read from the AST file.
Reimplemented from clang::ASTDeserializationListener.
Definition at line 5628 of file ASTWriter.cpp.
|
overridevirtual |
A module definition was read from the AST file.
Reimplemented from clang::ASTDeserializationListener.
Definition at line 5659 of file ASTWriter.cpp.
| bool ASTWriter::PreparePathForOutput | ( | SmallVectorImpl< char > & | Path | ) |
Convert a path from this build process into one that is appropriate for emission in the module file.
Definition at line 3969 of file ASTWriter.cpp.
References adjustFilenameForRelocatableAST(), cleanPathForOutput(), clang::SourceManager::getFileManager(), and clang::ASTContext::getSourceManager().
|
overridevirtual |
The ASTReader was initialized.
Reimplemented from clang::ASTDeserializationListener.
Definition at line 5592 of file ASTWriter.cpp.
References clang::serialization::NUM_PREDEF_DECL_IDS, clang::serialization::NUM_PREDEF_IDENT_IDS, clang::serialization::NUM_PREDEF_MACRO_IDS, clang::serialization::NUM_PREDEF_SELECTOR_IDS, clang::serialization::NUM_PREDEF_SUBMODULE_IDS, and clang::serialization::NUM_PREDEF_TYPE_IDS.
| unsigned ASTWriter::RecordSwitchCaseID | ( | SwitchCase * | S | ) |
Record an ID for the given switch-case statement.
Definition at line 2288 of file ASTWriterStmt.cpp.
References S.
A definition has been made visible by being redefined locally.
| D | The definition that was previously not visible. |
| M | The containing module in which the definition was made visible, if any. |
Reimplemented from clang::ASTMutationListener.
Definition at line 5832 of file ASTWriter.cpp.
References clang::NamedDecl::isHidden(), and clang::serialization::UPD_DECL_EXPORTED.
|
overridevirtual |
A function's exception specification has been evaluated or instantiated.
Reimplemented from clang::ASTMutationListener.
Definition at line 5734 of file ASTWriter.cpp.
References clang::isUnresolvedExceptionSpec(), and clang::serialization::UPD_CXX_RESOLVED_EXCEPTION_SPEC.
|
overridevirtual |
A virtual destructor's operator delete has been resolved.
Reimplemented from clang::ASTMutationListener.
Definition at line 5757 of file ASTWriter.cpp.
References clang::serialization::UPD_CXX_RESOLVED_DTOR_DELETE.
|
overridevirtual |
A selector was read from the AST file.
Reimplemented from clang::ASTDeserializationListener.
Definition at line 5646 of file ASTWriter.cpp.
References S.
| void ASTWriter::SetIdentifierOffset | ( | const IdentifierInfo * | II, |
| uint32_t | Offset | ||
| ) |
Note that the identifier II occurs at the given offset within the identifier table.
Definition at line 4015 of file ASTWriter.cpp.
| void ASTWriter::SetSelectorOffset | ( | Selector | Sel, |
| uint32_t | Offset | ||
| ) |
Note that the selector Sel occurs at the given offset within the method pool/selector table.
Definition at line 4025 of file ASTWriter.cpp.
|
overridevirtual |
A static data member was implicitly instantiated.
Reimplemented from clang::ASTMutationListener.
Definition at line 5784 of file ASTWriter.cpp.
References clang::VarDecl::getMemberSpecializationInfo(), clang::MemberSpecializationInfo::getPointOfInstantiation(), clang::Decl::isFromASTFile(), and clang::serialization::UPD_CXX_INSTANTIATED_STATIC_DATA_MEMBER.
|
overridevirtual |
A type was deserialized from the AST file.
The ID here has the qualifier bits already removed, and T is guaranteed to be locally unqualified.
Reimplemented from clang::ASTDeserializationListener.
Definition at line 5635 of file ASTWriter.cpp.
References clang::serialization::TypeIdx::getIndex().
| uint64_t ASTWriter::WriteAST | ( | Sema & | SemaRef, |
| const std::string & | OutputFile, | ||
| Module * | WritingModule, | ||
| StringRef | isysroot, | ||
| bool | hasErrors = false |
||
| ) |
Write a precompiled header for the given semantic analysis.
| SemaRef | a reference to the semantic analysis object that processed the AST to be written into the precompiled header. |
| WritingModule | The module that we are writing. If null, we are writing a precompiled header. |
| isysroot | if non-empty, write a relocatable file whose headers are relative to the given system root. If we're writing a module, its build directory will be used in preference to this if both are available. |
Definition at line 4078 of file ASTWriter.cpp.
References clang::Sema::Context, and clang::Sema::PP.
Referenced by clang::PCHGenerator::HandleTranslationUnit(), and serializeUnit().
|
friend |
Definition at line 91 of file ASTWriter.h.
|
friend |
Definition at line 92 of file ASTWriter.h.
1.8.6