clang API Documentation
Reads an AST files chain containing the contents of a translation unit. More...
#include <ASTReader.h>


Classes | |
| struct | FileDeclsInfo |
| struct | PendingIdentifierInfo |
| An IdentifierInfo that has been loaded but whose top-level declarations of the same name have not (yet) been loaded. | |
| class | ReadingKindTracker |
| RAII object to change the reading kind. | |
| struct | RecordLocation |
| struct | ReplacedDeclInfo |
| struct | UnresolvedModuleImportExport |
| A module import or export that hasn't yet been resolved. | |
Public Types | |
| enum | ASTReadResult { Success, Failure, IgnorePCH } |
| typedef serialization::ModuleFile | ModuleFile |
| typedef serialization::ModuleKind | ModuleKind |
| typedef serialization::ModuleManager | ModuleManager |
| typedef ModuleManager::ModuleIterator | ModuleIterator |
| typedef ModuleManager::ModuleConstIterator | ModuleConstIterator |
| typedef ModuleManager::ModuleReverseIterator | ModuleReverseIterator |
| typedef SmallVector< uint64_t, 64 > | RecordData |
Public Member Functions | |
| ASTReader (Preprocessor &PP, ASTContext &Context, StringRef isysroot="", bool DisableValidation=false, bool DisableStatCache=false, bool AllowASTWithCompilerErrors=false) | |
| Load the AST file and validate its contents against the given Preprocessor. | |
| ~ASTReader () | |
| SourceManager & | getSourceManager () const |
| ASTReadResult | ReadAST (const std::string &FileName, ModuleKind Type) |
| Load the AST file designated by the given file name. | |
| ASTReadResult | validateFileEntries (ModuleFile &M) |
| Checks that no file that is stored in PCH is out-of-sync with the actual file in the file system. | |
| void | makeModuleVisible (Module *Mod, Module::NameVisibilityKind NameVisibility) |
| Make the entities in the given module and any of its (non-explicit) submodules visible to name lookup. | |
| void | makeNamesVisible (const HiddenNames &Names) |
| Make the names within this set of hidden names visible. | |
| void | setListener (ASTReaderListener *listener) |
| Set the AST callbacks listener. | |
| void | setDeserializationListener (ASTDeserializationListener *Listener) |
| Set the AST deserialization listener. | |
| void | InitializeContext () |
| Initializes the ASTContext. | |
| void | addInMemoryBuffer (StringRef &FileName, llvm::MemoryBuffer *Buffer) |
| Add in-memory (virtual file) buffer. | |
| void | finalizeForWriting () |
| Finalizes the AST reader's state before writing an AST file to disk. | |
| ModuleManager & | getModuleManager () |
| Retrieve the module manager. | |
| Preprocessor & | getPreprocessor () const |
| Retrieve the preprocessor. | |
| const std::string & | getOriginalSourceFile () |
| Retrieve the name of the original source file name. | |
| const std::string & | getSuggestedPredefines () |
| Returns the suggested contents of the predefines buffer, which contains a (typically-empty) subset of the predefines build prior to including the precompiled header. | |
| virtual PreprocessedEntity * | ReadPreprocessedEntity (unsigned Index) |
| Read a preallocated preprocessed entity from the external source. | |
| virtual std::pair< unsigned, unsigned > | findPreprocessedEntitiesInRange (SourceRange Range) |
| Returns a pair of [Begin, End) indices of preallocated preprocessed entities that. | |
| virtual llvm::Optional< bool > | isPreprocessedEntityInFileID (unsigned Index, FileID FID) |
| Optionally returns true or false if the preallocated preprocessed entity with index. | |
| virtual HeaderFileInfo | GetHeaderFileInfo (const FileEntry *FE) |
| Read the header file information for the given file entry. | |
| void | ReadPragmaDiagnosticMappings (DiagnosticsEngine &Diag) |
| unsigned | getTotalNumSLocs () const |
| Returns the number of source locations found in the chain. | |
| unsigned | getTotalNumIdentifiers () const |
| Returns the number of identifiers found in the chain. | |
| unsigned | getTotalNumTypes () const |
| Returns the number of types found in the chain. | |
| unsigned | getTotalNumDecls () const |
| Returns the number of declarations found in the chain. | |
| unsigned | getTotalNumSubmodules () const |
| Returns the number of submodules known. | |
| unsigned | getTotalNumSelectors () const |
| Returns the number of selectors found in the chain. | |
| unsigned | getTotalNumPreprocessedEntities () const |
| Returns the number of preprocessed entities known to the AST reader. | |
| unsigned | getTotalNumCXXBaseSpecifiers () const |
| Returns the number of C++ base specifiers found in the chain. | |
| TemplateArgumentLocInfo | GetTemplateArgumentLocInfo (ModuleFile &F, TemplateArgument::ArgKind Kind, const RecordData &Record, unsigned &Idx) |
| Reads a TemplateArgumentLocInfo appropriate for the given TemplateArgument kind. | |
| TemplateArgumentLoc | ReadTemplateArgumentLoc (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
| Reads a TemplateArgumentLoc. | |
| TypeSourceInfo * | GetTypeSourceInfo (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
| Reads a declarator info from the given record. | |
| QualType | GetType (serialization::TypeID ID) |
| Resolve a type ID into a type, potentially building a new type. | |
| QualType | getLocalType (ModuleFile &F, unsigned LocalID) |
| Resolve a local type ID within a given AST file into a type. | |
| serialization::TypeID | getGlobalTypeID (ModuleFile &F, unsigned LocalID) const |
| Map a local type ID within a given AST file into a global type ID. | |
| QualType | readType (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
| Read a type from the current position in the given record, which was read from the given AST file. | |
| serialization::DeclID | getGlobalDeclID (ModuleFile &F, unsigned LocalID) const |
| Map from a local declaration ID within a given module to a global declaration ID. | |
| bool | isDeclIDFromModule (serialization::GlobalDeclID ID, ModuleFile &M) const |
| Returns true if global DeclID. | |
| ModuleFile * | getOwningModuleFile (Decl *D) |
| Retrieve the module file that owns the given declaration, or NULL if the declaration is not from a module file. | |
| SourceLocation | getSourceLocationForDeclID (serialization::GlobalDeclID ID) |
| Returns the source location for the decl. | |
| Decl * | GetDecl (serialization::DeclID ID) |
| Resolve a declaration ID into a declaration, potentially building a new declaration. | |
| virtual Decl * | GetExternalDecl (uint32_t ID) |
| Resolve a declaration ID into a declaration, potentially building a new declaration. | |
| Decl * | GetLocalDecl (ModuleFile &F, uint32_t LocalID) |
| Reads a declaration with the given local ID in the given module. | |
| template<typename T > | |
| T * | GetLocalDeclAs (ModuleFile &F, uint32_t LocalID) |
| Reads a declaration with the given local ID in the given module. | |
| serialization::DeclID | mapGlobalIDToModuleFileGlobalID (ModuleFile &M, serialization::DeclID GlobalID) |
| Map a global declaration ID into the declaration ID used to refer to this declaration within the given module fule. | |
| serialization::DeclID | ReadDeclID (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
| Reads a declaration ID from the given position in a record in the given module. | |
| Decl * | ReadDecl (ModuleFile &F, const RecordData &R, unsigned &I) |
| Reads a declaration from the given position in a record in the given module. | |
| template<typename T > | |
| T * | ReadDeclAs (ModuleFile &F, const RecordData &R, unsigned &I) |
| Reads a declaration from the given position in a record in the given module. | |
| uint64_t | readCXXBaseSpecifiers (ModuleFile &M, const RecordData &Record, unsigned &Idx) |
| Read a CXXBaseSpecifiers ID form the given record and return its global bit offset. | |
| virtual CXXBaseSpecifier * | GetExternalCXXBaseSpecifiers (uint64_t Offset) |
| Resolve the offset of a set of C++ base specifiers in the decl stream into an array of specifiers. | |
| virtual Stmt * | GetExternalDeclStmt (uint64_t Offset) |
| Resolve the offset of a statement into a statement. | |
| bool | ReadBlockAbbrevs (llvm::BitstreamCursor &Cursor, unsigned BlockID) |
| virtual DeclContext::lookup_result | FindExternalVisibleDeclsByName (const DeclContext *DC, DeclarationName Name) |
| Finds all the visible declarations with a given name. The current implementation of this method just loads the entire lookup table as unmaterialized references. | |
| virtual ExternalLoadResult | FindExternalLexicalDecls (const DeclContext *DC, bool(*isKindWeWant)(Decl::Kind), SmallVectorImpl< Decl * > &Decls) |
| Read all of the declarations lexically stored in a declaration context. | |
| virtual void | FindFileRegionDecls (FileID File, unsigned Offset, unsigned Length, SmallVectorImpl< Decl * > &Decls) |
| Get the decls that are contained in a file in the Offset/Length range. | |
| virtual void | StartedDeserializing () |
| Notify ASTReader that we started deserialization of a decl or type so until FinishedDeserializing is called there may be decls that are initializing. Must be paired with FinishedDeserializing. | |
| virtual void | FinishedDeserializing () |
| Notify ASTReader that we finished the deserialization of a decl or type. Must be paired with StartedDeserializing. | |
| virtual void | StartTranslationUnit (ASTConsumer *Consumer) |
| Function that will be invoked when we begin parsing a new translation unit involving this external AST source. | |
| virtual void | PrintStats () |
| Print some statistics about AST usage. | |
| void | dump () |
| Dump information about the AST reader to standard error. | |
| virtual void | getMemoryBufferSizes (MemoryBufferSizes &sizes) const |
| virtual void | InitializeSema (Sema &S) |
| Initialize the semantic source with the Sema instance being used to perform semantic analysis on the abstract syntax tree. | |
| virtual void | ForgetSema () |
| Inform the semantic consumer that Sema is no longer available. | |
| virtual IdentifierInfo * | get (const char *NameStart, const char *NameEnd) |
| Retrieve the IdentifierInfo for the named identifier. | |
| IdentifierInfo * | get (StringRef Name) |
| virtual IdentifierIterator * | getIdentifiers () const |
| Retrieve an iterator into the set of all identifiers in all loaded AST files. | |
| virtual void | ReadMethodPool (Selector Sel) |
| Load the contents of the global method pool for a given selector. | |
| virtual void | ReadKnownNamespaces (SmallVectorImpl< NamespaceDecl * > &Namespaces) |
| Load the set of namespaces that are known to the external source, which will be used during typo correction. | |
| virtual void | ReadTentativeDefinitions (SmallVectorImpl< VarDecl * > &TentativeDefs) |
| Read the set of tentative definitions known to the external Sema source. | |
| virtual void | ReadUnusedFileScopedDecls (SmallVectorImpl< const DeclaratorDecl * > &Decls) |
| Read the set of unused file-scope declarations known to the external Sema source. | |
| virtual void | ReadDelegatingConstructors (SmallVectorImpl< CXXConstructorDecl * > &Decls) |
| Read the set of delegating constructors known to the external Sema source. | |
| virtual void | ReadExtVectorDecls (SmallVectorImpl< TypedefNameDecl * > &Decls) |
| Read the set of ext_vector type declarations known to the external Sema source. | |
| virtual void | ReadDynamicClasses (SmallVectorImpl< CXXRecordDecl * > &Decls) |
| Read the set of dynamic classes known to the external Sema source. | |
| virtual void | ReadLocallyScopedExternalDecls (SmallVectorImpl< NamedDecl * > &Decls) |
| Read the set of locally-scoped external declarations known to the external Sema source. | |
| virtual void | ReadReferencedSelectors (SmallVectorImpl< std::pair< Selector, SourceLocation > > &Sels) |
| Read the set of referenced selectors known to the external Sema source. | |
| virtual void | ReadWeakUndeclaredIdentifiers (SmallVectorImpl< std::pair< IdentifierInfo *, WeakInfo > > &WI) |
| Read the set of weak, undeclared identifiers known to the external Sema source. | |
| virtual void | ReadUsedVTables (SmallVectorImpl< ExternalVTableUse > &VTables) |
| Read the set of used vtables known to the external Sema source. | |
| virtual void | ReadPendingInstantiations (SmallVectorImpl< std::pair< ValueDecl *, SourceLocation > > &Pending) |
| Read the set of pending instantiations known to the external Sema source. | |
| void | LoadSelector (Selector Sel) |
| Load a selector from disk, registering its ID if it exists. | |
| void | SetIdentifierInfo (unsigned ID, IdentifierInfo *II) |
| void | SetGloballyVisibleDecls (IdentifierInfo *II, const SmallVectorImpl< uint32_t > &DeclIDs, bool Nonrecursive=false) |
| Set the globally-visible declarations associated with the given identifier. | |
| DiagnosticBuilder | Diag (unsigned DiagID) |
| Report a diagnostic. | |
| DiagnosticBuilder | Diag (SourceLocation Loc, unsigned DiagID) |
| Report a diagnostic. | |
| IdentifierInfo * | DecodeIdentifierInfo (serialization::IdentifierID ID) |
| IdentifierInfo * | GetIdentifierInfo (ModuleFile &M, const RecordData &Record, unsigned &Idx) |
| virtual IdentifierInfo * | GetIdentifier (serialization::IdentifierID ID) |
| IdentifierInfo * | getLocalIdentifier (ModuleFile &M, unsigned LocalID) |
| serialization::IdentifierID | getGlobalIdentifierID (ModuleFile &M, unsigned LocalID) |
| virtual bool | ReadSLocEntry (int ID) |
| Read the source location entry with index ID. | |
| serialization::SubmoduleID | getGlobalSubmoduleID (ModuleFile &M, unsigned LocalID) |
| Retrieve the global submodule ID given a module and its local ID number. | |
| Module * | getSubmodule (serialization::SubmoduleID GlobalID) |
| Retrieve the submodule that corresponds to a global submodule ID. | |
| Selector | getLocalSelector (ModuleFile &M, unsigned LocalID) |
| Retrieve a selector from the given module with its local ID number. | |
| Selector | DecodeSelector (serialization::SelectorID Idx) |
| virtual Selector | GetExternalSelector (serialization::SelectorID ID) |
| Resolve a selector ID into a selector. | |
| uint32_t | GetNumExternalSelectors () |
| Returns the number of selectors known to the external AST source. | |
| Selector | ReadSelector (ModuleFile &M, const RecordData &Record, unsigned &Idx) |
| serialization::SelectorID | getGlobalSelectorID (ModuleFile &F, unsigned LocalID) const |
| Retrieve the global selector ID that corresponds to this the local selector ID in a given module. | |
| DeclarationName | ReadDeclarationName (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
| Read a declaration name. | |
| void | ReadDeclarationNameLoc (ModuleFile &F, DeclarationNameLoc &DNLoc, DeclarationName Name, const RecordData &Record, unsigned &Idx) |
| void | ReadDeclarationNameInfo (ModuleFile &F, DeclarationNameInfo &NameInfo, const RecordData &Record, unsigned &Idx) |
| void | ReadQualifierInfo (ModuleFile &F, QualifierInfo &Info, const RecordData &Record, unsigned &Idx) |
| NestedNameSpecifier * | ReadNestedNameSpecifier (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
| NestedNameSpecifierLoc | ReadNestedNameSpecifierLoc (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
| TemplateName | ReadTemplateName (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
| Read a template name. | |
| TemplateArgument | ReadTemplateArgument (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
| Read a template argument. | |
| TemplateParameterList * | ReadTemplateParameterList (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
| Read a template parameter list. | |
| void | ReadTemplateArgumentList (SmallVector< TemplateArgument, 8 > &TemplArgs, ModuleFile &F, const RecordData &Record, unsigned &Idx) |
| Read a template argument array. | |
| void | ReadUnresolvedSet (ModuleFile &F, UnresolvedSetImpl &Set, const RecordData &Record, unsigned &Idx) |
| Read a UnresolvedSet structure. | |
| CXXBaseSpecifier | ReadCXXBaseSpecifier (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
| Read a C++ base specifier. | |
| std::pair< CXXCtorInitializer **, unsigned > | ReadCXXCtorInitializers (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
| Read a CXXCtorInitializer array. | |
| SourceLocation | ReadSourceLocation (ModuleFile &ModuleFile, unsigned Raw) const |
| Read a source location from raw form. | |
| SourceLocation | ReadSourceLocation (ModuleFile &ModuleFile, const RecordData &Record, unsigned &Idx) |
| Read a source location. | |
| SourceRange | ReadSourceRange (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
| Read a source range. | |
| llvm::APInt | ReadAPInt (const RecordData &Record, unsigned &Idx) |
| Read an integral value. | |
| llvm::APSInt | ReadAPSInt (const RecordData &Record, unsigned &Idx) |
| Read a signed integral value. | |
| llvm::APFloat | ReadAPFloat (const RecordData &Record, unsigned &Idx) |
| Read a floating-point value. | |
| std::string | ReadString (const RecordData &Record, unsigned &Idx) |
| VersionTuple | ReadVersionTuple (const RecordData &Record, unsigned &Idx) |
| Read a version tuple. | |
| CXXTemporary * | ReadCXXTemporary (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
| void | ReadAttributes (ModuleFile &F, AttrVec &Attrs, const RecordData &Record, unsigned &Idx) |
| Reads attributes from the current stream position. | |
| Stmt * | ReadStmt (ModuleFile &F) |
| Reads a statement. | |
| Expr * | ReadExpr (ModuleFile &F) |
| Reads an expression. | |
| Stmt * | ReadSubStmt () |
| Reads a sub-statement operand during statement reading. | |
| Expr * | ReadSubExpr () |
| Reads a sub-expression operand during statement reading. | |
| void | ReadMacroRecord (ModuleFile &F, uint64_t Offset) |
| Reads the macro record located at the given offset. | |
| serialization::PreprocessedEntityID | getGlobalPreprocessedEntityID (ModuleFile &M, unsigned LocalID) const |
| Determine the global preprocessed entity ID that corresponds to the given local ID within the given module. | |
| void | setIdentifierIsMacro (IdentifierInfo *II, ModuleFile &F, uint64_t Offset, bool Visible) |
| Note that the identifier is a macro whose record will be loaded from the given AST file at the given (file-local) offset. | |
| virtual void | ReadDefinedMacros () |
| Read the set of macros defined by this external macro source. | |
| virtual void | LoadMacroDefinition (IdentifierInfo *II) |
| Read the macro definition for this identifier. | |
| virtual void | updateOutOfDateIdentifier (IdentifierInfo &II) |
| Update an out-of-date identifier. | |
| void | markIdentifierUpToDate (IdentifierInfo *II) |
| Note that this identifier is up-to-date. | |
| void | LoadMacroDefinition (llvm::DenseMap< IdentifierInfo *, uint64_t >::iterator Pos) |
| Read the macro definition corresponding to this iterator into the unread macro record offsets table. | |
| void | completeVisibleDeclsMap (const DeclContext *DC) |
| Load all external visible decls in the given DeclContext. | |
| ASTContext & | getContext () |
| Retrieve the AST context that this AST reader supplements. | |
| Sema * | getSema () |
| Retrieve the semantic analysis object used to analyze the translation unit in which the precompiled header is being imported. | |
| IdentifierTable & | getIdentifierTable () |
| Retrieve the identifier table associated with the preprocessor. | |
| void | RecordSwitchCaseID (SwitchCase *SC, unsigned ID) |
| Record that the given ID maps to the given switch-case statement. | |
| SwitchCase * | getSwitchCaseWithID (unsigned ID) |
| Retrieve the switch-case statement with the given ID. | |
| void | ClearSwitchCaseIDs () |
Static Public Member Functions | |
| static std::string | getOriginalSourceFile (const std::string &ASTFileName, FileManager &FileMgr, DiagnosticsEngine &Diags) |
| Retrieve the name of the original source file name directly from the AST file, without actually loading the AST file. | |
Public Attributes | |
| SmallVector< NamedDecl *, 16 > | PreloadedDecls |
Friends | |
| class | PCHValidator |
| Types of AST files. | |
| class | ASTDeclReader |
| class | ASTStmtReader |
| class | ASTIdentifierIterator |
| class | serialization::reader::ASTIdentifierLookupTrait |
| class | TypeLocReader |
| class | ASTWriter |
| class | ASTUnit |
| class | serialization::ReadMethodPoolVisitor |
Reads an AST files chain containing the contents of a translation unit.
The ASTReader class reads bitstreams (produced by the ASTWriter class) containing the serialized representation of a given abstract syntax tree and its supporting data structures. An instance of the ASTReader can be attached to an ASTContext object, which will provide access to the contents of the AST files.
The AST reader provides lazy de-serialization of declarations, as required when traversing the AST. Only those AST nodes that are actually required will be de-serialized.
Definition at line 192 of file ASTReader.h.
Definition at line 219 of file ASTReader.h.
Definition at line 214 of file ASTReader.h.
Definition at line 218 of file ASTReader.h.
Definition at line 215 of file ASTReader.h.
Definition at line 216 of file ASTReader.h.
Definition at line 220 of file ASTReader.h.
| typedef SmallVector<uint64_t, 64> clang::ASTReader::RecordData |
Definition at line 865 of file ASTReader.h.
Definition at line 202 of file ASTReader.h.
| ASTReader::ASTReader | ( | Preprocessor & | PP, |
| ASTContext & | Context, | ||
| StringRef | isysroot = "", |
||
| bool | DisableValidation = false, |
||
| bool | DisableStatCache = false, |
||
| bool | AllowASTWithCompilerErrors = false |
||
| ) |
Load the AST file and validate its contents against the given Preprocessor.
| PP | the preprocessor associated with the context in which this precompiled header will be loaded. |
| Context | the AST context that this precompiled header will be loaded into. |
| isysroot | If non-NULL, the system include path specified by the user. This is only used with relocatable PCH files. If non-NULL, a relocatable PCH file will use the default path "/". |
| DisableValidation | If true, the AST reader will suppress most of its regular consistency checking, allowing the use of precompiled headers that cannot be determined to be compatible. |
| DisableStatCache | If true, the AST reader will ignore the stat cache in the AST files. This performance pessimization can help when an AST file is being used in cases where the underlying files in the file system may have changed, but parsing should still continue. |
| AllowASTWithCompilerErrors | If true, the AST reader will accept an AST file the was created out of an AST with compiler errors, otherwise it will reject it. |
Definition at line 6367 of file ASTReader.cpp.
References clang::SourceManager::setExternalSLocEntrySource().
| ASTReader::~ASTReader | ( | ) |
Definition at line 6393 of file ASTReader.cpp.
| void clang::ASTReader::addInMemoryBuffer | ( | StringRef & | FileName, |
| llvm::MemoryBuffer * | Buffer | ||
| ) | [inline] |
Add in-memory (virtual file) buffer.
Definition at line 933 of file ASTReader.h.
References clang::serialization::ModuleManager::addInMemoryBuffer().
| void ASTReader::ClearSwitchCaseIDs | ( | ) |
Definition at line 6262 of file ASTReader.cpp.
| void ASTReader::completeVisibleDeclsMap | ( | const DeclContext * | DC | ) | [virtual] |
Load all external visible decls in the given DeclContext.
Reimplemented from clang::ExternalASTSource.
Definition at line 5018 of file ASTReader.cpp.
References clang::DeclContext::hasExternalVisibleStorage(), and clang::DeclContext::isNamespace().
| IdentifierInfo * ASTReader::DecodeIdentifierInfo | ( | serialization::IdentifierID | ID | ) |
Definition at line 5612 of file ASTReader.cpp.
References clang::serialization::ModuleFile::BaseIdentifierID, clang::ContinuousRangeMap< Int, V, InitialCapacity >::end(), clang::ContinuousRangeMap< Int, V, InitialCapacity >::find(), clang::IdentifierTable::get(), clang::Preprocessor::getIdentifierTable(), clang::ASTDeserializationListener::IdentifierRead(), and Index.
Referenced by GetIdentifier(), GetIdentifierInfo(), getLocalIdentifier(), and ReadWeakUndeclaredIdentifiers().
| Selector ASTReader::DecodeSelector | ( | serialization::SelectorID | Idx | ) |
Definition at line 5697 of file ASTReader.cpp.
References clang::ContinuousRangeMap< Int, V, InitialCapacity >::end(), clang::ContinuousRangeMap< Int, V, InitialCapacity >::find(), clang::serialization::NUM_PREDEF_SELECTOR_IDS, clang::serialization::reader::ASTSelectorLookupTrait::ReadKey(), and clang::ASTDeserializationListener::SelectorRead().
Referenced by GetExternalSelector(), getLocalSelector(), and ReadReferencedSelectors().
| DiagnosticBuilder ASTReader::Diag | ( | unsigned | DiagID | ) |
Report a diagnostic.
Definition at line 6234 of file ASTReader.cpp.
| DiagnosticBuilder ASTReader::Diag | ( | SourceLocation | Loc, |
| unsigned | DiagID | ||
| ) |
Report a diagnostic.
Definition at line 6238 of file ASTReader.cpp.
References clang::DiagnosticsEngine::Report().
| void ASTReader::dump | ( | ) |
Dump information about the AST reader to standard error.
Definition at line 5186 of file ASTReader.cpp.
References dumpModuleIDMap().
| void ASTReader::finalizeForWriting | ( | ) |
Finalizes the AST reader's state before writing an AST file to disk.
This operation may undo temporary state in the AST that should not be emitted.
Definition at line 2978 of file ASTReader.cpp.
| ExternalLoadResult ASTReader::FindExternalLexicalDecls | ( | const DeclContext * | DC, |
| bool(*)(Decl::Kind) | isKindWeWant, | ||
| SmallVectorImpl< Decl * > & | Decls | ||
| ) | [virtual] |
Read all of the declarations lexically stored in a declaration context.
| DC | The declaration context whose declarations will be read. |
| Decls | Vector that will contain the declarations loaded from the external source. The caller is responsible for merging these declarations with any declarations already stored in the declaration context. |
Reimplemented from clang::ExternalASTSource.
Definition at line 4769 of file ASTReader.cpp.
References clang::ELR_Success.
| DeclContext::lookup_result ASTReader::FindExternalVisibleDeclsByName | ( | const DeclContext * | DC, |
| DeclarationName | Name | ||
| ) | [virtual] |
Finds all the visible declarations with a given name. The current implementation of this method just loads the entire lookup table as unmaterialized references.
Reimplemented from clang::ExternalASTSource.
Definition at line 4925 of file ASTReader.cpp.
References clang::DeclContext::hasExternalVisibleStorage(), and clang::DeclContext::isNamespace().
| void ASTReader::FindFileRegionDecls | ( | FileID | File, |
| unsigned | Offset, | ||
| unsigned | Length, | ||
| SmallVectorImpl< Decl * > & | Decls | ||
| ) | [virtual] |
Get the decls that are contained in a file in the Offset/Length range.
Reimplemented from clang::ExternalASTSource.
Definition at line 4813 of file ASTReader.cpp.
References clang::SourceManager::getLocForStartOfFile(), and clang::SourceLocation::getLocWithOffset().
| std::pair< unsigned, unsigned > ASTReader::findPreprocessedEntitiesInRange | ( | SourceRange | Range | ) | [virtual] |
Returns a pair of [Begin, End) indices of preallocated preprocessed entities that.
Implements clang::ExternalPreprocessingRecordSource.
Definition at line 3582 of file ASTReader.cpp.
References clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), and clang::SourceRange::isInvalid().
| void ASTReader::FinishedDeserializing | ( | ) | [virtual] |
Notify ASTReader that we finished the deserialization of a decl or type. Must be paired with StartedDeserializing.
Reimplemented from clang::ExternalASTSource.
Definition at line 6340 of file ASTReader.cpp.
| virtual void clang::ASTReader::ForgetSema | ( | ) | [inline, virtual] |
Inform the semantic consumer that Sema is no longer available.
Reimplemented from clang::ExternalSemaSource.
Definition at line 1212 of file ASTReader.h.
| IdentifierInfo * ASTReader::get | ( | const char * | NameStart, |
| const char * | NameEnd | ||
| ) | [virtual] |
Retrieve the IdentifierInfo for the named identifier.
This routine builds a new IdentifierInfo for the given identifier. If any declarations with this name are visible from translation unit scope, their declarations will be deserialized and introduced into the declaration chain of the identifier.
Definition at line 5260 of file ASTReader.cpp.
Referenced by clang::ASTUnit::LoadFromASTFile().
| IdentifierInfo* clang::ASTReader::get | ( | StringRef | Name | ) | [inline, virtual] |
get - Return the identifier token info for the specified named identifier. Unlike the version in IdentifierTable, this returns a pointer instead of a reference. If the pointer is NULL then the IdentifierInfo cannot be found.
Implements clang::IdentifierInfoLookup.
Definition at line 1221 of file ASTReader.h.
| ASTContext& clang::ASTReader::getContext | ( | ) | [inline] |
Retrieve the AST context that this AST reader supplements.
Definition at line 1481 of file ASTReader.h.
| Decl * ASTReader::GetDecl | ( | serialization::DeclID | ID | ) |
Resolve a declaration ID into a declaration, potentially building a new declaration.
Definition at line 4621 of file ASTReader.cpp.
References Index, clang::serialization::NUM_PREDEF_DECL_IDS, clang::serialization::PREDEF_DECL_INT_128_ID, clang::serialization::PREDEF_DECL_NULL_ID, clang::serialization::PREDEF_DECL_OBJC_CLASS_ID, clang::serialization::PREDEF_DECL_OBJC_ID_ID, clang::serialization::PREDEF_DECL_OBJC_INSTANCETYPE_ID, clang::serialization::PREDEF_DECL_OBJC_PROTOCOL_ID, clang::serialization::PREDEF_DECL_OBJC_SEL_ID, clang::serialization::PREDEF_DECL_TRANSLATION_UNIT_ID, and clang::serialization::PREDEF_DECL_UNSIGNED_INT_128_ID.
Referenced by GetLocalDecl(), ReadDecl(), ReadDeclAs(), ReadDelegatingConstructors(), ReadDynamicClasses(), ReadExtVectorDecls(), ReadKnownNamespaces(), ReadLocallyScopedExternalDecls(), ReadPendingInstantiations(), ReadTentativeDefinitions(), ReadUnusedFileScopedDecls(), ReadUsedVTables(), and SetGloballyVisibleDecls().
| CXXBaseSpecifier * ASTReader::GetExternalCXXBaseSpecifiers | ( | uint64_t | Offset | ) | [virtual] |
Resolve the offset of a set of C++ base specifiers in the decl stream into an array of specifiers.
The default implementation of this method is a no-op.
Reimplemented from clang::ExternalASTSource.
Definition at line 4552 of file ASTReader.cpp.
References clang::serialization::DECL_CXX_BASE_SPECIFIERS.
| Decl * ASTReader::GetExternalDecl | ( | uint32_t | ID | ) | [virtual] |
Resolve a declaration ID into a declaration, potentially building a new declaration.
This method only needs to be implemented if the AST source ever passes back decl sets as VisibleDeclaration objects.
The default implementation of this method is a no-op.
Reimplemented from clang::ExternalASTSource.
Definition at line 4539 of file ASTReader.cpp.
| Stmt * ASTReader::GetExternalDeclStmt | ( | uint64_t | Offset | ) | [virtual] |
Resolve the offset of a statement into a statement.
This operation will read a new statement from the external source each time it is called, and is meant to be used via a LazyOffsetPtr (which is used by Decls for the body of functions, etc).
Reimplemented from clang::ExternalASTSource.
Definition at line 4701 of file ASTReader.cpp.
| Selector ASTReader::GetExternalSelector | ( | serialization::SelectorID | ID | ) | [virtual] |
Resolve a selector ID into a selector.
This operation only needs to be implemented if the AST source returns non-zero for GetNumKnownSelectors().
The default implementation of this method is a no-op.
Reimplemented from clang::ExternalASTSource.
Definition at line 5722 of file ASTReader.cpp.
References DecodeSelector().
| serialization::DeclID ASTReader::getGlobalDeclID | ( | ModuleFile & | F, |
| unsigned | LocalID | ||
| ) | const |
Map from a local declaration ID within a given module to a global declaration ID.
Definition at line 4576 of file ASTReader.cpp.
References clang::serialization::ModuleFile::DeclRemap, clang::ContinuousRangeMap< Int, V, InitialCapacity >::end(), clang::ContinuousRangeMap< Int, V, InitialCapacity >::find(), and clang::serialization::NUM_PREDEF_DECL_IDS.
Referenced by GetLocalDecl().
| IdentifierID ASTReader::getGlobalIdentifierID | ( | ModuleFile & | M, |
| unsigned | LocalID | ||
| ) |
Definition at line 5650 of file ASTReader.cpp.
References clang::ContinuousRangeMap< Int, V, InitialCapacity >::end(), clang::ContinuousRangeMap< Int, V, InitialCapacity >::find(), clang::serialization::ModuleFile::IdentifierRemap, and clang::serialization::NUM_PREDEF_IDENT_IDS.
Referenced by GetIdentifierInfo(), and getLocalIdentifier().
| PreprocessedEntityID ASTReader::getGlobalPreprocessedEntityID | ( | ModuleFile & | M, |
| unsigned | LocalID | ||
| ) | const |
Determine the global preprocessed entity ID that corresponds to the given local ID within the given module.
Definition at line 1378 of file ASTReader.cpp.
References clang::ContinuousRangeMap< Int, V, InitialCapacity >::end(), clang::ContinuousRangeMap< Int, V, InitialCapacity >::find(), clang::serialization::NUM_PREDEF_PP_ENTITY_IDS, and clang::serialization::ModuleFile::PreprocessedEntityRemap.
| serialization::SelectorID ASTReader::getGlobalSelectorID | ( | ModuleFile & | F, |
| unsigned | LocalID | ||
| ) | const |
Retrieve the global selector ID that corresponds to this the local selector ID in a given module.
Definition at line 5732 of file ASTReader.cpp.
References clang::ContinuousRangeMap< Int, V, InitialCapacity >::end(), clang::ContinuousRangeMap< Int, V, InitialCapacity >::find(), clang::serialization::NUM_PREDEF_SELECTOR_IDS, and clang::serialization::ModuleFile::SelectorRemap.
Referenced by getLocalSelector().
| serialization::SubmoduleID ASTReader::getGlobalSubmoduleID | ( | ModuleFile & | M, |
| unsigned | LocalID | ||
| ) |
Retrieve the global submodule ID given a module and its local ID number.
Definition at line 5667 of file ASTReader.cpp.
References clang::ContinuousRangeMap< Int, V, InitialCapacity >::end(), clang::ContinuousRangeMap< Int, V, InitialCapacity >::find(), and clang::serialization::ModuleFile::SubmoduleRemap.
| serialization::TypeID ASTReader::getGlobalTypeID | ( | ModuleFile & | F, |
| unsigned | LocalID | ||
| ) | const |
Map a local type ID within a given AST file into a global type ID.
Definition at line 4477 of file ASTReader.cpp.
References clang::ContinuousRangeMap< Int, V, InitialCapacity >::end(), clang::Qualifiers::FastMask, clang::Qualifiers::FastWidth, clang::ContinuousRangeMap< Int, V, InitialCapacity >::find(), clang::serialization::NUM_PREDEF_TYPE_IDS, and clang::serialization::ModuleFile::TypeRemap.
| HeaderFileInfo ASTReader::GetHeaderFileInfo | ( | const FileEntry * | FE | ) | [virtual] |
Read the header file information for the given file entry.
Implements clang::ExternalHeaderFileInfoSource.
Definition at line 3654 of file ASTReader.cpp.
References clang::FileEntry::getUID().
| virtual IdentifierInfo* clang::ASTReader::GetIdentifier | ( | serialization::IdentifierID | ID | ) | [inline, virtual] |
Definition at line 1287 of file ASTReader.h.
References DecodeIdentifierInfo().
| IdentifierInfo* clang::ASTReader::GetIdentifierInfo | ( | ModuleFile & | M, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) | [inline] |
Definition at line 1282 of file ASTReader.h.
References DecodeIdentifierInfo(), and getGlobalIdentifierID().
Referenced by ReadDeclarationName(), ReadNestedNameSpecifier(), ReadNestedNameSpecifierLoc(), and ReadTemplateName().
| IdentifierIterator * ASTReader::getIdentifiers | ( | ) | const [virtual] |
Retrieve an iterator into the set of all identifiers in all loaded AST files.
Reimplemented from clang::IdentifierInfoLookup.
Definition at line 5324 of file ASTReader.cpp.
References ASTIdentifierIterator.
| IdentifierTable & ASTReader::getIdentifierTable | ( | ) |
Retrieve the identifier table associated with the preprocessor.
Definition at line 6244 of file ASTReader.cpp.
References clang::Preprocessor::getIdentifierTable().
| Decl* clang::ASTReader::GetLocalDecl | ( | ModuleFile & | F, |
| uint32_t | LocalID | ||
| ) | [inline] |
Reads a declaration with the given local ID in the given module.
Definition at line 1087 of file ASTReader.h.
References GetDecl(), and getGlobalDeclID().
Referenced by GetLocalDeclAs().
| T* clang::ASTReader::GetLocalDeclAs | ( | ModuleFile & | F, |
| uint32_t | LocalID | ||
| ) | [inline] |
Reads a declaration with the given local ID in the given module.
Definition at line 1095 of file ASTReader.h.
References GetLocalDecl().
| IdentifierInfo * ASTReader::getLocalIdentifier | ( | ModuleFile & | M, |
| unsigned | LocalID | ||
| ) |
Definition at line 5646 of file ASTReader.cpp.
References DecodeIdentifierInfo(), and getGlobalIdentifierID().
| Selector ASTReader::getLocalSelector | ( | ModuleFile & | M, |
| unsigned | LocalID | ||
| ) |
Retrieve a selector from the given module with its local ID number.
Definition at line 5693 of file ASTReader.cpp.
References DecodeSelector(), and getGlobalSelectorID().
Referenced by ReadSelector().
| QualType ASTReader::getLocalType | ( | ModuleFile & | F, |
| unsigned | LocalID | ||
| ) |
Resolve a local type ID within a given AST file into a type.
Definition at line 4472 of file ASTReader.cpp.
Referenced by readType().
| void ASTReader::getMemoryBufferSizes | ( | MemoryBufferSizes & | sizes | ) | const [virtual] |
Return the amount of memory used by memory buffers, breaking down by heap-backed versus mmap'ed memory.
Reimplemented from clang::ExternalASTSource.
Definition at line 5207 of file ASTReader.cpp.
References clang::ExternalASTSource::MemoryBufferSizes::malloc_bytes, and clang::ExternalASTSource::MemoryBufferSizes::mmap_bytes.
| ModuleManager& clang::ASTReader::getModuleManager | ( | ) | [inline] |
Retrieve the module manager.
Definition at line 945 of file ASTReader.h.
| uint32_t ASTReader::GetNumExternalSelectors | ( | ) | [virtual] |
Returns the number of selectors known to the external AST source.
The default implementation of this method is a no-op.
Reimplemented from clang::ExternalASTSource.
Definition at line 5726 of file ASTReader.cpp.
References getTotalNumSelectors().
| const std::string& clang::ASTReader::getOriginalSourceFile | ( | ) | [inline] |
Retrieve the name of the original source file name.
Definition at line 951 of file ASTReader.h.
Referenced by ParsePreprocessorArgs().
| std::string ASTReader::getOriginalSourceFile | ( | const std::string & | ASTFileName, |
| FileManager & | FileMgr, | ||
| DiagnosticsEngine & | Diags | ||
| ) | [static] |
Retrieve the name of the original source file name directly from the AST file, without actually loading the AST file.
Definition at line 2990 of file ASTReader.cpp.
References clang::serialization::AST_BLOCK_ID, clang::FileManager::getBufferForFile(), clang::serialization::ORIGINAL_FILE_NAME, and clang::DiagnosticsEngine::Report().
| ModuleFile * ASTReader::getOwningModuleFile | ( | Decl * | D | ) |
Retrieve the module file that owns the given declaration, or NULL if the declaration is not from a module file.
Definition at line 4594 of file ASTReader.cpp.
References clang::Decl::getGlobalID(), and clang::Decl::isFromASTFile().
| Preprocessor& clang::ASTReader::getPreprocessor | ( | ) | const [inline] |
Retrieve the preprocessor.
Definition at line 948 of file ASTReader.h.
| Sema* clang::ASTReader::getSema | ( | ) | [inline] |
Retrieve the semantic analysis object used to analyze the translation unit in which the precompiled header is being imported.
Definition at line 1490 of file ASTReader.h.
Referenced by ReadMethodPool().
| SourceLocation ASTReader::getSourceLocationForDeclID | ( | serialization::GlobalDeclID | ID | ) |
Returns the source location for the decl.
Definition at line 4602 of file ASTReader.cpp.
References clang::Decl::getLocation(), and clang::serialization::NUM_PREDEF_DECL_IDS.
| SourceManager& clang::ASTReader::getSourceManager | ( | ) | const [inline] |
Definition at line 899 of file ASTReader.h.
| Module * ASTReader::getSubmodule | ( | serialization::SubmoduleID | GlobalID | ) |
Retrieve the submodule that corresponds to a global submodule ID.
Definition at line 5679 of file ASTReader.cpp.
References clang::serialization::NUM_PREDEF_SUBMODULE_IDS.
| const std::string& clang::ASTReader::getSuggestedPredefines | ( | ) | [inline] |
Returns the suggested contents of the predefines buffer, which contains a (typically-empty) subset of the predefines build prior to including the precompiled header.
Definition at line 962 of file ASTReader.h.
| SwitchCase * ASTReader::getSwitchCaseWithID | ( | unsigned | ID | ) |
Retrieve the switch-case statement with the given ID.
Definition at line 6257 of file ASTReader.cpp.
| TemplateArgumentLocInfo ASTReader::GetTemplateArgumentLocInfo | ( | ModuleFile & | F, |
| TemplateArgument::ArgKind | Kind, | ||
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Reads a TemplateArgumentLocInfo appropriate for the given TemplateArgument kind.
Definition at line 4493 of file ASTReader.cpp.
References clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgument::Integral, clang::TemplateArgument::Null, clang::TemplateArgument::Pack, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.
| unsigned clang::ASTReader::getTotalNumCXXBaseSpecifiers | ( | ) | const [inline] |
Returns the number of C++ base specifiers found in the chain.
Definition at line 1028 of file ASTReader.h.
| unsigned clang::ASTReader::getTotalNumDecls | ( | ) | const [inline] |
Returns the number of declarations found in the chain.
Definition at line 1001 of file ASTReader.h.
Referenced by clang::ASTWriter::ReaderInitialized().
| unsigned clang::ASTReader::getTotalNumIdentifiers | ( | ) | const [inline] |
Returns the number of identifiers found in the chain.
Definition at line 991 of file ASTReader.h.
Referenced by clang::ASTWriter::ReaderInitialized().
| unsigned clang::ASTReader::getTotalNumPreprocessedEntities | ( | ) | const [inline] |
Returns the number of preprocessed entities known to the AST reader.
Definition at line 1017 of file ASTReader.h.
References clang::serialization::ModuleManager::begin(), and clang::serialization::ModuleManager::end().
| unsigned clang::ASTReader::getTotalNumSelectors | ( | ) | const [inline] |
Returns the number of selectors found in the chain.
Definition at line 1011 of file ASTReader.h.
Referenced by GetNumExternalSelectors(), and clang::ASTWriter::ReaderInitialized().
| unsigned clang::ASTReader::getTotalNumSLocs | ( | ) | const [inline] |
Returns the number of source locations found in the chain.
Definition at line 986 of file ASTReader.h.
| unsigned clang::ASTReader::getTotalNumSubmodules | ( | ) | const [inline] |
Returns the number of submodules known.
Definition at line 1006 of file ASTReader.h.
Referenced by clang::ASTWriter::ReaderInitialized().
| unsigned clang::ASTReader::getTotalNumTypes | ( | ) | const [inline] |
Returns the number of types found in the chain.
Definition at line 996 of file ASTReader.h.
Referenced by clang::ASTWriter::ReaderInitialized().
| QualType ASTReader::GetType | ( | serialization::TypeID | ID | ) |
Resolve a type ID into a type, potentially building a new type.
Definition at line 4395 of file ASTReader.cpp.
References clang::Qualifiers::FastMask, clang::Qualifiers::FastWidth, Index, clang::QualType::isNull(), clang::serialization::NUM_PREDEF_TYPE_IDS, clang::serialization::PREDEF_TYPE_ARC_UNBRIDGED_CAST, clang::serialization::PREDEF_TYPE_AUTO_DEDUCT, clang::serialization::PREDEF_TYPE_AUTO_RREF_DEDUCT, clang::serialization::PREDEF_TYPE_BOOL_ID, clang::serialization::PREDEF_TYPE_BOUND_MEMBER, clang::serialization::PREDEF_TYPE_CHAR16_ID, clang::serialization::PREDEF_TYPE_CHAR32_ID, clang::serialization::PREDEF_TYPE_CHAR_S_ID, clang::serialization::PREDEF_TYPE_CHAR_U_ID, clang::serialization::PREDEF_TYPE_DEPENDENT_ID, clang::serialization::PREDEF_TYPE_DOUBLE_ID, clang::serialization::PREDEF_TYPE_FLOAT_ID, clang::serialization::PREDEF_TYPE_HALF_ID, clang::serialization::PREDEF_TYPE_INT128_ID, clang::serialization::PREDEF_TYPE_INT_ID, clang::serialization::PREDEF_TYPE_LONG_ID, clang::serialization::PREDEF_TYPE_LONGDOUBLE_ID, clang::serialization::PREDEF_TYPE_LONGLONG_ID, clang::serialization::PREDEF_TYPE_NULL_ID, clang::serialization::PREDEF_TYPE_NULLPTR_ID, clang::serialization::PREDEF_TYPE_OBJC_CLASS, clang::serialization::PREDEF_TYPE_OBJC_ID, clang::serialization::PREDEF_TYPE_OBJC_SEL, clang::serialization::PREDEF_TYPE_OVERLOAD_ID, clang::serialization::PREDEF_TYPE_PSEUDO_OBJECT, clang::serialization::PREDEF_TYPE_SCHAR_ID, clang::serialization::PREDEF_TYPE_SHORT_ID, clang::serialization::PREDEF_TYPE_UCHAR_ID, clang::serialization::PREDEF_TYPE_UINT128_ID, clang::serialization::PREDEF_TYPE_UINT_ID, clang::serialization::PREDEF_TYPE_ULONG_ID, clang::serialization::PREDEF_TYPE_ULONGLONG_ID, clang::serialization::PREDEF_TYPE_UNKNOWN_ANY, clang::serialization::PREDEF_TYPE_USHORT_ID, clang::serialization::PREDEF_TYPE_VOID_ID, clang::serialization::PREDEF_TYPE_WCHAR_ID, and clang::QualType::withFastQualifiers().
| TypeSourceInfo * ASTReader::GetTypeSourceInfo | ( | ModuleFile & | F, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Reads a declarator info from the given record.
Definition at line 4381 of file ASTReader.cpp.
References clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getNextTypeLoc(), clang::TypeSourceInfo::getTypeLoc(), clang::TypeLoc::isNull(), clang::QualType::isNull(), and clang::TypeLocVisitor< ImplClass, RetTy >::Visit().
Referenced by ReadCXXBaseSpecifier(), ReadCXXCtorInitializers(), ReadDeclarationNameLoc(), and ReadNestedNameSpecifierLoc().
| void ASTReader::InitializeContext | ( | ) |
Initializes the ASTContext.
Definition at line 2838 of file ASTReader.cpp.
References clang::Module::AllVisible, clang::TagType::getDecl(), clang::QualType::isNull(), clang::serialization::NumSpecialTypeIDs, clang::serialization::PREDEF_DECL_TRANSLATION_UNIT_ID, clang::serialization::SPECIAL_TYPE_BUILTIN_VA_LIST, clang::serialization::SPECIAL_TYPE_CF_CONSTANT_STRING, clang::serialization::SPECIAL_TYPE_FILE, clang::serialization::SPECIAL_TYPE_JMP_BUF, clang::serialization::SPECIAL_TYPE_OBJC_CLASS_REDEFINITION, clang::serialization::SPECIAL_TYPE_OBJC_ID_REDEFINITION, clang::serialization::SPECIAL_TYPE_OBJC_SEL_REDEFINITION, clang::serialization::SPECIAL_TYPE_SIGJMP_BUF, and clang::serialization::SPECIAL_TYPE_UCONTEXT_T.
| void ASTReader::InitializeSema | ( | Sema & | S | ) | [virtual] |
Initialize the semantic source with the Sema instance being used to perform semantic analysis on the abstract syntax tree.
Reimplemented from clang::ExternalSemaSource.
Definition at line 5224 of file ASTReader.cpp.
References clang::Sema::ExternalSource, and S.
Referenced by clang::ASTUnit::LoadFromASTFile(), and clang::CompilerInstance::loadModule().
| bool ASTReader::isDeclIDFromModule | ( | serialization::GlobalDeclID | ID, |
| ModuleFile & | M | ||
| ) | const |
Returns true if global DeclID.
Definition at line 4587 of file ASTReader.cpp.
| llvm::Optional< bool > ASTReader::isPreprocessedEntityInFileID | ( | unsigned | Index, |
| FileID | FID | ||
| ) | [virtual] |
Optionally returns true or false if the preallocated preprocessed entity with index.
Reimplemented from clang::ExternalPreprocessingRecordSource.
Definition at line 3594 of file ASTReader.cpp.
References clang::serialization::PPEntityOffset::Begin, clang::FileID::isInvalid(), clang::SourceLocation::isInvalid(), and clang::serialization::ModuleFile::PreprocessedEntityOffsets.
| void ASTReader::LoadMacroDefinition | ( | IdentifierInfo * | II | ) | [virtual] |
Read the macro definition for this identifier.
Implements clang::ExternalPreprocessorSource.
Definition at line 1525 of file ASTReader.cpp.
| void ASTReader::LoadMacroDefinition | ( | llvm::DenseMap< IdentifierInfo *, uint64_t >::iterator | Pos | ) |
Read the macro definition corresponding to this iterator into the unread macro record offsets table.
Definition at line 1515 of file ASTReader.cpp.
| void ASTReader::LoadSelector | ( | Selector | Sel | ) |
Load a selector from disk, registering its ID if it exists.
Definition at line 5555 of file ASTReader.cpp.
References ReadMethodPool().
Referenced by clang::ASTWriter::getSelectorRef().
| void ASTReader::makeModuleVisible | ( | Module * | Mod, |
| Module::NameVisibilityKind | NameVisibility | ||
| ) |
Make the entities in the given module and any of its (non-explicit) submodules visible to name lookup.
| Mod | The module whose names should be made visible. |
| Visibility | The level of visibility to give the names in the module. Visibility can only be increased over time. |
Definition at line 2540 of file ASTReader.cpp.
References clang::Module::Exports, clang::Module::Imports, clang::Module::isAvailable(), clang::Module::isSubModuleOf(), clang::Module::NameVisibility, clang::Module::submodule_begin(), and clang::Module::submodule_end().
Referenced by clang::CompilerInstance::loadModule().
| void ASTReader::makeNamesVisible | ( | const HiddenNames & | Names | ) |
Make the names within this set of hidden names visible.
Definition at line 2525 of file ASTReader.cpp.
References clang::IdentifierInfo::setHasMacroDefinition().
| DeclID ASTReader::mapGlobalIDToModuleFileGlobalID | ( | ModuleFile & | M, |
| serialization::DeclID | GlobalID | ||
| ) |
Map a global declaration ID into the declaration ID used to refer to this declaration within the given module fule.
Definition at line 4668 of file ASTReader.cpp.
References clang::serialization::ModuleFile::GlobalToLocalDeclIDs, and clang::serialization::NUM_PREDEF_DECL_IDS.
| void ASTReader::markIdentifierUpToDate | ( | IdentifierInfo * | II | ) |
Note that this identifier is up-to-date.
Definition at line 1586 of file ASTReader.cpp.
References clang::IdentifierInfo::setOutOfDate().
| void ASTReader::PrintStats | ( | ) | [virtual] |
Print some statistics about AST usage.
Reimplemented from clang::ExternalASTSource.
Definition at line 5099 of file ASTReader.cpp.
| llvm::APFloat ASTReader::ReadAPFloat | ( | const RecordData & | Record, |
| unsigned & | Idx | ||
| ) |
| llvm::APInt ASTReader::ReadAPInt | ( | const RecordData & | Record, |
| unsigned & | Idx | ||
| ) |
Read an integral value.
Definition at line 6188 of file ASTReader.cpp.
Referenced by ReadAPFloat(), and ReadAPSInt().
| llvm::APSInt ASTReader::ReadAPSInt | ( | const RecordData & | Record, |
| unsigned & | Idx | ||
| ) |
Read a signed integral value.
Definition at line 6197 of file ASTReader.cpp.
References ReadAPInt().
Referenced by ReadTemplateArgument().
| ASTReader::ASTReadResult ASTReader::ReadAST | ( | const std::string & | FileName, |
| ModuleKind | Type | ||
| ) |
Load the AST file designated by the given file name.
Definition at line 2639 of file ASTReader.cpp.
References clang::serialization::MK_MainFile, clang::serialization::MK_PCH, and clang::serialization::MK_Preamble.
Referenced by clang::CompilerInstance::loadModule().
| void ASTReader::ReadAttributes | ( | ModuleFile & | F, |
| AttrVec & | Attrs, | ||
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Reads attributes from the current stream position.
Definition at line 1614 of file ASTReaderDecl.cpp.
| bool ASTReader::ReadBlockAbbrevs | ( | llvm::BitstreamCursor & | Cursor, |
| unsigned | BlockID | ||
| ) |
ReadBlockAbbrevs - Enter a subblock of the specified BlockID with the specified cursor. Read the abbreviations that are at the top of the block and then leave the cursor pointing into the block.
Definition at line 1233 of file ASTReader.cpp.
| CXXBaseSpecifier ASTReader::ReadCXXBaseSpecifier | ( | ModuleFile & | F, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Read a C++ base specifier.
Definition at line 5978 of file ASTReader.cpp.
References GetTypeSourceInfo(), ReadSourceLocation(), ReadSourceRange(), and clang::CXXBaseSpecifier::setInheritConstructors().
| uint64_t ASTReader::readCXXBaseSpecifiers | ( | ModuleFile & | M, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Read a CXXBaseSpecifiers ID form the given record and return its global bit offset.
Definition at line 4543 of file ASTReader.cpp.
References clang::serialization::ModuleFile::CXXBaseSpecifiersOffsets.
| std::pair< CXXCtorInitializer **, unsigned > ASTReader::ReadCXXCtorInitializers | ( | ModuleFile & | F, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Read a CXXCtorInitializer array.
Definition at line 5994 of file ASTReader.cpp.
References clang::CXXCtorInitializer::Create(), clang::serialization::CTOR_INITIALIZER_BASE, clang::serialization::CTOR_INITIALIZER_DELEGATING, clang::serialization::CTOR_INITIALIZER_INDIRECT_MEMBER, clang::serialization::CTOR_INITIALIZER_MEMBER, GetTypeSourceInfo(), ReadExpr(), ReadSourceLocation(), and clang::CXXCtorInitializer::setSourceOrder().
| CXXTemporary * ASTReader::ReadCXXTemporary | ( | ModuleFile & | F, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Definition at line 6227 of file ASTReader.cpp.
References clang::CXXTemporary::Create().
| Decl* clang::ASTReader::ReadDecl | ( | ModuleFile & | F, |
| const RecordData & | R, | ||
| unsigned & | I | ||
| ) | [inline] |
Reads a declaration from the given position in a record in the given module.
Definition at line 1117 of file ASTReader.h.
References GetDecl(), and ReadDeclID().
Referenced by ReadTemplateArgument(), and clang::ASTDeclReader::UpdateDecl().
| DeclarationName ASTReader::ReadDeclarationName | ( | ModuleFile & | F, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Read a declaration name.
Definition at line 5745 of file ASTReader.cpp.
References clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, clang::DeclarationName::CXXUsingDirective, clang::ASTContext::DeclarationNames, clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXConstructorName(), clang::DeclarationNameTable::getCXXConversionFunctionName(), clang::DeclarationNameTable::getCXXDestructorName(), clang::DeclarationNameTable::getCXXLiteralOperatorName(), clang::DeclarationNameTable::getCXXOperatorName(), GetIdentifierInfo(), clang::DeclarationName::getUsingDirectiveName(), clang::DeclarationName::Identifier, clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, clang::DeclarationName::ObjCZeroArgSelector, ReadSelector(), and readType().
Referenced by ReadDeclarationNameInfo().
| void ASTReader::ReadDeclarationNameInfo | ( | ModuleFile & | F, |
| DeclarationNameInfo & | NameInfo, | ||
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Definition at line 5816 of file ASTReader.cpp.
References clang::DeclarationNameInfo::getName(), ReadDeclarationName(), ReadDeclarationNameLoc(), ReadSourceLocation(), clang::DeclarationNameInfo::setInfo(), clang::DeclarationNameInfo::setLoc(), and clang::DeclarationNameInfo::setName().
| void ASTReader::ReadDeclarationNameLoc | ( | ModuleFile & | F, |
| DeclarationNameLoc & | DNLoc, | ||
| DeclarationName | Name, | ||
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Definition at line 5784 of file ASTReader.cpp.
References 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::DeclarationName::getNameKind(), clang::SourceLocation::getRawEncoding(), GetTypeSourceInfo(), clang::DeclarationName::Identifier, clang::DeclarationNameLoc::NamedType, clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, clang::DeclarationName::ObjCZeroArgSelector, and ReadSourceLocation().
Referenced by ReadDeclarationNameInfo().
| T* clang::ASTReader::ReadDeclAs | ( | ModuleFile & | F, |
| const RecordData & | R, | ||
| unsigned & | I | ||
| ) | [inline] |
Reads a declaration from the given position in a record in the given module.
Definition at line 1127 of file ASTReader.h.
References GetDecl(), and ReadDeclID().
Referenced by clang::ASTDeclReader::UpdateDecl().
| serialization::DeclID ASTReader::ReadDeclID | ( | ModuleFile & | F, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Reads a declaration ID from the given position in a record in the given module.
Definition at line 4685 of file ASTReader.cpp.
Referenced by ReadDecl(), and ReadDeclAs().
| void ASTReader::ReadDefinedMacros | ( | ) | [virtual] |
Read the set of macros defined by this external macro source.
Implements clang::ExternalPreprocessorSource.
Definition at line 1457 of file ASTReader.cpp.
References clang::serialization::PP_MACRO_FUNCTION_LIKE, clang::serialization::PP_MACRO_OBJECT_LIKE, and clang::serialization::PP_TOKEN.
| void ASTReader::ReadDelegatingConstructors | ( | SmallVectorImpl< CXXConstructorDecl * > & | Decls | ) | [virtual] |
Read the set of delegating constructors known to the external Sema source.
The external source should append its own delegating constructors to the given vector of declarations. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same declarations repeatedly.
Reimplemented from clang::ExternalSemaSource.
Definition at line 5452 of file ASTReader.cpp.
References GetDecl().
| void ASTReader::ReadDynamicClasses | ( | SmallVectorImpl< CXXRecordDecl * > & | Decls | ) | [virtual] |
Read the set of dynamic classes known to the external Sema source.
The external source should append its own dynamic classes to the given vector of declarations. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same declarations repeatedly.
Reimplemented from clang::ExternalSemaSource.
Definition at line 5473 of file ASTReader.cpp.
References GetDecl().
| Expr * ASTReader::ReadExpr | ( | ModuleFile & | F | ) |
Reads an expression.
Definition at line 1545 of file ASTReaderStmt.cpp.
Referenced by ReadCXXCtorInitializers(), and ReadTemplateArgument().
| void ASTReader::ReadExtVectorDecls | ( | SmallVectorImpl< TypedefNameDecl * > & | Decls | ) | [virtual] |
Read the set of ext_vector type declarations known to the external Sema source.
The external source should append its own ext_vector type declarations to the given vector of declarations. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same declarations repeatedly.
Reimplemented from clang::ExternalSemaSource.
Definition at line 5463 of file ASTReader.cpp.
References GetDecl().
| void ASTReader::ReadKnownNamespaces | ( | SmallVectorImpl< NamespaceDecl * > & | Namespaces | ) | [virtual] |
Load the set of namespaces that are known to the external source, which will be used during typo correction.
Reimplemented from clang::ExternalSemaSource.
Definition at line 5420 of file ASTReader.cpp.
References GetDecl().
| void ASTReader::ReadLocallyScopedExternalDecls | ( | SmallVectorImpl< NamedDecl * > & | Decls | ) | [virtual] |
Read the set of locally-scoped external declarations known to the external Sema source.
The external source should append its own locally-scoped external declarations to the given vector of declarations. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same declarations repeatedly.
Reimplemented from clang::ExternalSemaSource.
Definition at line 5484 of file ASTReader.cpp.
References GetDecl().
| void ASTReader::ReadMacroRecord | ( | ModuleFile & | F, |
| uint64_t | Offset | ||
| ) |
Reads the macro record located at the given offset.
Definition at line 1253 of file ASTReader.cpp.
References clang::MacroInfo::AddTokenToBody(), clang::serialization::ModuleFile::MacroCursor, NumArgs, clang::serialization::PP_MACRO_FUNCTION_LIKE, clang::serialization::PP_MACRO_OBJECT_LIKE, clang::serialization::PP_TOKEN, clang::MacroInfo::setArgumentList(), clang::Token::setFlag(), clang::Token::setIdentifierInfo(), clang::MacroInfo::setIsC99Varargs(), clang::MacroInfo::setIsFromAST(), clang::MacroInfo::setIsFunctionLike(), clang::MacroInfo::setIsGNUVarargs(), clang::MacroInfo::setIsUsed(), clang::Token::setKind(), clang::Token::setLength(), clang::Token::setLocation(), clang::MacroInfo::setVisibility(), and clang::Token::startToken().
| void ASTReader::ReadMethodPool | ( | Selector | Sel | ) | [virtual] |
Load the contents of the global method pool for a given selector.
Reimplemented from clang::ExternalSemaSource.
Definition at line 5393 of file ASTReader.cpp.
References addMethodsToPool(), clang::serialization::ReadMethodPoolVisitor::getFactoryMethods(), clang::serialization::ReadMethodPoolVisitor::getInstanceMethods(), getSema(), clang::Sema::MethodPool, S, and clang::serialization::ModuleManager::visit().
Referenced by LoadSelector().
| NestedNameSpecifier * ASTReader::ReadNestedNameSpecifier | ( | ModuleFile & | F, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Definition at line 6075 of file ASTReader.cpp.
References clang::NestedNameSpecifier::Create(), GetIdentifierInfo(), clang::QualType::getTypePtrOrNull(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::GlobalSpecifier(), clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, readType(), clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
Referenced by ReadTemplateName().
| NestedNameSpecifierLoc ASTReader::ReadNestedNameSpecifierLoc | ( | ModuleFile & | F, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Definition at line 6124 of file ASTReader.cpp.
References clang::NestedNameSpecifierLocBuilder::Extend(), clang::SourceRange::getBegin(), clang::TypeLoc::getBeginLoc(), clang::SourceRange::getEnd(), GetIdentifierInfo(), clang::TypeSourceInfo::getTypeLoc(), GetTypeSourceInfo(), clang::NestedNameSpecifierLocBuilder::getWithLocInContext(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifierLocBuilder::MakeGlobal(), clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, ReadSourceLocation(), ReadSourceRange(), clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
Referenced by ReadQualifierInfo().
| void ASTReader::ReadPendingInstantiations | ( | SmallVectorImpl< std::pair< ValueDecl *, SourceLocation > > & | Pending | ) | [virtual] |
Read the set of pending instantiations known to the external Sema source.
The external source should append its own pending instantiations to the given vector. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same instantiations repeatedly.
Reimplemented from clang::ExternalSemaSource.
Definition at line 5544 of file ASTReader.cpp.
References GetDecl(), and clang::SourceLocation::getFromRawEncoding().
| void ASTReader::ReadPragmaDiagnosticMappings | ( | DiagnosticsEngine & | Diag | ) |
Definition at line 3666 of file ASTReader.cpp.
References clang::serialization::ModuleFile::PragmaDiagMappings.
| PreprocessedEntity * ASTReader::ReadPreprocessedEntity | ( | unsigned | Index | ) | [virtual] |
Read a preallocated preprocessed entity from the external source.
Implements clang::ExternalPreprocessingRecordSource.
Definition at line 3351 of file ASTReader.cpp.
References clang::serialization::PPEntityOffset::Begin, clang::serialization::PPEntityOffset::BitOffset, clang::serialization::PPEntityOffset::End, clang::serialization::PPD_INCLUSION_DIRECTIVE, clang::serialization::PPD_MACRO_DEFINITION, clang::serialization::PPD_MACRO_EXPANSION, clang::serialization::ModuleFile::PreprocessedEntityOffsets, and clang::serialization::ModuleFile::PreprocessorDetailCursor.
| void ASTReader::ReadQualifierInfo | ( | ModuleFile & | F, |
| QualifierInfo & | Info, | ||
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Definition at line 5826 of file ASTReader.cpp.
References clang::QualifierInfo::NumTemplParamLists, clang::QualifierInfo::QualifierLoc, ReadNestedNameSpecifierLoc(), ReadTemplateParameterList(), and clang::QualifierInfo::TemplParamLists.
| void ASTReader::ReadReferencedSelectors | ( | SmallVectorImpl< std::pair< Selector, SourceLocation > > & | Sels | ) | [virtual] |
Read the set of referenced selectors known to the external Sema source.
The external source should append its own referenced selectors to the given vector of selectors. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same selectors repeatedly.
Reimplemented from clang::ExternalSemaSource.
Definition at line 5494 of file ASTReader.cpp.
References DecodeSelector(), and clang::SourceLocation::getFromRawEncoding().
| Selector clang::ASTReader::ReadSelector | ( | ModuleFile & | M, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) | [inline] |
Definition at line 1317 of file ASTReader.h.
References getLocalSelector().
Referenced by ReadDeclarationName().
| bool ASTReader::ReadSLocEntry | ( | int | ID | ) | [virtual] |
Read the source location entry with index ID.
Implements clang::ExternalSLocEntrySource.
Definition at line 5662 of file ASTReader.cpp.
References Success.
| SourceLocation clang::ASTReader::ReadSourceLocation | ( | ModuleFile & | ModuleFile, |
| unsigned | Raw | ||
| ) | const [inline] |
Read a source location from raw form.
Definition at line 1379 of file ASTReader.h.
References clang::ContinuousRangeMap< Int, V, InitialCapacity >::end(), clang::ContinuousRangeMap< Int, V, InitialCapacity >::find(), clang::SourceLocation::getFromRawEncoding(), clang::SourceLocation::getLocWithOffset(), and clang::serialization::ModuleFile::SLocRemap.
Referenced by ReadCXXBaseSpecifier(), ReadCXXCtorInitializers(), ReadDeclarationNameInfo(), ReadDeclarationNameLoc(), ReadNestedNameSpecifierLoc(), ReadSourceLocation(), ReadSourceRange(), ReadTemplateParameterList(), and clang::ASTDeclReader::UpdateDecl().
| SourceLocation clang::ASTReader::ReadSourceLocation | ( | ModuleFile & | ModuleFile, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) | [inline] |
Read a source location.
Definition at line 1388 of file ASTReader.h.
References ReadSourceLocation().
| SourceRange ASTReader::ReadSourceRange | ( | ModuleFile & | F, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Read a source range.
Definition at line 6180 of file ASTReader.cpp.
References ReadSourceLocation().
Referenced by ReadCXXBaseSpecifier(), and ReadNestedNameSpecifierLoc().
| Stmt * ASTReader::ReadStmt | ( | ModuleFile & | F | ) |
Reads a statement.
Definition at line 1533 of file ASTReaderStmt.cpp.
| std::string ASTReader::ReadString | ( | const RecordData & | Record, |
| unsigned & | Idx | ||
| ) |
Definition at line 6208 of file ASTReader.cpp.
| Expr * ASTReader::ReadSubExpr | ( | ) |
Reads a sub-expression operand during statement reading.
Definition at line 1549 of file ASTReaderStmt.cpp.
| Stmt* clang::ASTReader::ReadSubStmt | ( | ) | [inline] |
Reads a sub-statement operand during statement reading.
Definition at line 1426 of file ASTReader.h.
| TemplateArgument ASTReader::ReadTemplateArgument | ( | ModuleFile & | F, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Read a template argument.
Definition at line 5898 of file ASTReader.cpp.
References clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgument::Integral, clang::TemplateArgument::Null, NumArgs, clang::TemplateArgument::Pack, ReadAPSInt(), ReadDecl(), ReadExpr(), ReadTemplateName(), readType(), clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.
Referenced by ReadTemplateArgumentList(), and ReadTemplateName().
| void ASTReader::ReadTemplateArgumentList | ( | SmallVector< TemplateArgument, 8 > & | TemplArgs, |
| ModuleFile & | F, | ||
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Read a template argument array.
Definition at line 5957 of file ASTReader.cpp.
References ReadTemplateArgument().
| TemplateArgumentLoc ASTReader::ReadTemplateArgumentLoc | ( | ModuleFile & | F, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Reads a TemplateArgumentLoc.
Definition at line 4527 of file ASTReader.cpp.
References Arg, clang::TemplateArgument::Expression, clang::TemplateArgument::getAsExpr(), clang::TemplateArgument::getKind(), and Index.
| TemplateName ASTReader::ReadTemplateName | ( | ModuleFile & | F, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Read a template name.
Definition at line 5839 of file ASTReader.cpp.
References clang::UnresolvedSetImpl::addDecl(), clang::UnresolvedSetImpl::begin(), clang::TemplateName::DependentTemplate, clang::UnresolvedSetImpl::end(), clang::ASTContext::getDependentTemplateName(), GetIdentifierInfo(), clang::TemplateArgument::getKind(), clang::ASTContext::getOverloadedTemplateName(), clang::ASTContext::getQualifiedTemplateName(), clang::ASTContext::getSubstTemplateTemplateParm(), clang::ASTContext::getSubstTemplateTemplateParmPack(), clang::TemplateName::OverloadedTemplate, clang::TemplateArgument::Pack, Param, clang::TemplateName::QualifiedTemplate, ReadNestedNameSpecifier(), ReadTemplateArgument(), clang::TemplateName::SubstTemplateTemplateParm, clang::TemplateName::SubstTemplateTemplateParmPack, and clang::TemplateName::Template.
Referenced by ReadTemplateArgument().
| TemplateParameterList * ASTReader::ReadTemplateParameterList | ( | ModuleFile & | F, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Read a template parameter list.
Definition at line 5937 of file ASTReader.cpp.
References clang::TemplateParameterList::Create(), and ReadSourceLocation().
Referenced by ReadQualifierInfo().
| void ASTReader::ReadTentativeDefinitions | ( | SmallVectorImpl< VarDecl * > & | TentativeDefs | ) | [virtual] |
Read the set of tentative definitions known to the external Sema source.
The external source should append its own tentative definitions to the given vector of tentative definitions. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same declarations repeatedly.
Reimplemented from clang::ExternalSemaSource.
Definition at line 5431 of file ASTReader.cpp.
References GetDecl().
| QualType clang::ASTReader::readType | ( | ModuleFile & | F, |
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) | [inline] |
Read a type from the current position in the given record, which was read from the given AST file.
Definition at line 1059 of file ASTReader.h.
References getLocalType().
Referenced by ReadDeclarationName(), ReadNestedNameSpecifier(), and ReadTemplateArgument().
| void ASTReader::ReadUnresolvedSet | ( | ModuleFile & | F, |
| UnresolvedSetImpl & | Set, | ||
| const RecordData & | Record, | ||
| unsigned & | Idx | ||
| ) |
Read a UnresolvedSet structure.
Definition at line 5967 of file ASTReader.cpp.
References clang::UnresolvedSetImpl::addDecl().
| void ASTReader::ReadUnusedFileScopedDecls | ( | SmallVectorImpl< const DeclaratorDecl * > & | Decls | ) | [virtual] |
Read the set of unused file-scope declarations known to the external Sema source.
The external source should append its own unused, filed-scope to the given vector of declarations. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same declarations repeatedly.
Reimplemented from clang::ExternalSemaSource.
Definition at line 5441 of file ASTReader.cpp.
References GetDecl().
| void ASTReader::ReadUsedVTables | ( | SmallVectorImpl< ExternalVTableUse > & | VTables | ) | [virtual] |
Read the set of used vtables known to the external Sema source.
The external source should append its own used vtables to the given vector. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same vtables repeatedly.
Reimplemented from clang::ExternalSemaSource.
Definition at line 5532 of file ASTReader.cpp.
References clang::ExternalVTableUse::DefinitionRequired, GetDecl(), clang::SourceLocation::getFromRawEncoding(), clang::ExternalVTableUse::Location, and clang::ExternalVTableUse::Record.
| VersionTuple ASTReader::ReadVersionTuple | ( | const RecordData & | Record, |
| unsigned & | Idx | ||
| ) |
Read a version tuple.
Definition at line 6215 of file ASTReader.cpp.
| void ASTReader::ReadWeakUndeclaredIdentifiers | ( | SmallVectorImpl< std::pair< IdentifierInfo *, WeakInfo > > & | WI | ) | [virtual] |
Read the set of weak, undeclared identifiers known to the external Sema source.
The external source should append its own weak, undeclared identifiers to the given vector. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same identifiers repeatedly.
Reimplemented from clang::ExternalSemaSource.
Definition at line 5512 of file ASTReader.cpp.
References DecodeIdentifierInfo(), clang::SourceLocation::getFromRawEncoding(), clang::WeakInfo::setUsed(), and Used.
| void ASTReader::RecordSwitchCaseID | ( | SwitchCase * | SC, |
| unsigned | ID | ||
| ) |
Record that the given ID maps to the given switch-case statement.
Definition at line 6250 of file ASTReader.cpp.
| void ASTReader::setDeserializationListener | ( | ASTDeserializationListener * | Listener | ) |
Set the AST deserialization listener.
Definition at line 414 of file ASTReader.cpp.
Referenced by clang::CompilerInstance::loadModule().
| void ASTReader::SetGloballyVisibleDecls | ( | IdentifierInfo * | II, |
| const SmallVectorImpl< uint32_t > & | DeclIDs, | ||
| bool | Nonrecursive = false |
||
| ) |
Set the globally-visible declarations associated with the given identifier.
If the AST reader is currently in a state where the given declaration IDs cannot safely be resolved, they are queued until it is safe to resolve them.
| II | an IdentifierInfo that refers to one or more globally-visible declarations. |
| DeclIDs | the set of declaration IDs with the name II that are visible at global scope. |
| Nonrecursive | should be true to indicate that the caller knows that this call is non-recursive, and therefore the globally-visible declarations will not be placed onto the pending queue. |
Definition at line 5585 of file ASTReader.cpp.
References GetDecl(), PreloadedDecls, and clang::Sema::pushExternalDeclIntoScope().
| void ASTReader::SetIdentifierInfo | ( | unsigned | ID, |
| IdentifierInfo * | II | ||
| ) |
Definition at line 5560 of file ASTReader.cpp.
References clang::ASTDeserializationListener::IdentifierRead().
| void ASTReader::setIdentifierIsMacro | ( | IdentifierInfo * | II, |
| ModuleFile & | F, | ||
| uint64_t | Offset, | ||
| bool | Visible | ||
| ) |
Note that the identifier is a macro whose record will be loaded from the given AST file at the given (file-local) offset.
| II | The name of the macro. |
| F | The module file from which the macro definition was deserialized. |
| Offset | The offset into the module file at which the macro definition is located. |
| Visible | Whether the macro should be made visible. |
Definition at line 1446 of file ASTReader.cpp.
References clang::serialization::ModuleFile::GlobalBitOffset, and clang::IdentifierInfo::setHasMacroDefinition().
| void clang::ASTReader::setListener | ( | ASTReaderListener * | listener | ) | [inline] |
Set the AST callbacks listener.
Definition at line 922 of file ASTReader.h.
| virtual void clang::ASTReader::StartedDeserializing | ( | ) | [inline, virtual] |
Notify ASTReader that we started deserialization of a decl or type so until FinishedDeserializing is called there may be decls that are initializing. Must be paired with FinishedDeserializing.
Reimplemented from clang::ExternalASTSource.
Definition at line 1183 of file ASTReader.h.
| void ASTReader::StartTranslationUnit | ( | ASTConsumer * | Consumer | ) | [virtual] |
Function that will be invoked when we begin parsing a new translation unit involving this external AST source.
This function will provide all of the external definitions to the ASTConsumer.
Reimplemented from clang::ExternalASTSource.
Definition at line 5083 of file ASTReader.cpp.
Referenced by clang::CompilerInstance::loadModule().
| void ASTReader::updateOutOfDateIdentifier | ( | IdentifierInfo & | II | ) | [virtual] |
Update an out-of-date identifier.
Implements clang::ExternalPreprocessorSource.
Definition at line 1576 of file ASTReader.cpp.
References clang::IdentifierInfo::getName().
| ASTReader::ASTReadResult ASTReader::validateFileEntries | ( | ModuleFile & | M | ) |
Checks that no file that is stored in PCH is out-of-sync with the actual file in the file system.
Definition at line 2435 of file ASTReader.cpp.
References clang::SourceManager::disableFileContentsOverride(), clang::FileEntry::getModificationTime(), clang::FileEntry::getName(), clang::FileEntry::getSize(), clang::SourceManager::isFileOverridden(), clang::serialization::ModuleFile::LocalNumSLocFileEntries, clang::serialization::ModuleFile::SLocEntryCursor, clang::serialization::ModuleFile::SLocFileOffsets, and clang::serialization::SM_SLOC_FILE_ENTRY.
friend class ASTDeclReader [friend] |
Definition at line 205 of file ASTReader.h.
friend class ASTIdentifierIterator [friend] |
Definition at line 207 of file ASTReader.h.
Referenced by getIdentifiers().
friend class ASTStmtReader [friend] |
Definition at line 206 of file ASTReader.h.
friend class ASTUnit [friend] |
Definition at line 211 of file ASTReader.h.
friend class ASTWriter [friend] |
Definition at line 210 of file ASTReader.h.
friend class PCHValidator [friend] |
Types of AST files.
Definition at line 204 of file ASTReader.h.
friend class serialization::reader::ASTIdentifierLookupTrait [friend] |
Definition at line 208 of file ASTReader.h.
friend class serialization::ReadMethodPoolVisitor [friend] |
Definition at line 212 of file ASTReader.h.
friend class TypeLocReader [friend] |
Definition at line 209 of file ASTReader.h.
| SmallVector<NamedDecl *, 16> clang::ASTReader::PreloadedDecls |
Definition at line 1485 of file ASTReader.h.
Referenced by SetGloballyVisibleDecls().