clang
3.7.0
|
Reads an AST files chain containing the contents of a translation unit. More...
#include <ASTReader.h>
Classes | |
class | ListenerScope |
RAII object to temporarily add an AST callback listener. More... | |
Public Types | |
enum | ASTReadResult { Success, Failure, Missing, OutOfDate, VersionMismatch, ConfigurationMismatch, HadErrors } |
The result of reading the control block of an AST file, which can fail for various reasons. More... | |
enum | LoadFailureCapabilities { ARR_None = 0, ARR_Missing = 0x1, ARR_OutOfDate = 0x2, ARR_VersionMismatch = 0x4, ARR_ConfigurationMismatch = 0x8 } |
Flags that indicate what kind of AST loading failures the client of the AST reader can directly handle. More... | |
typedef SmallVector< uint64_t, 64 > | RecordData |
typedef SmallVectorImpl< uint64_t > | RecordDataImpl |
typedef serialization::ModuleFile | ModuleFile |
typedef serialization::ModuleKind | ModuleKind |
typedef serialization::ModuleManager | ModuleManager |
typedef ModuleManager::ModuleIterator | ModuleIterator |
typedef ModuleManager::ModuleConstIterator | ModuleConstIterator |
typedef ModuleManager::ModuleReverseIterator | ModuleReverseIterator |
Public Member Functions | |
void | ResolveImportedPath (ModuleFile &M, std::string &Filename) |
If we are loading a relocatable PCH or module file, and the filename is not an absolute path, add the system or module root to the beginning of the file name. More... | |
Decl * | getKeyDeclaration (Decl *D) |
Returns the first key declaration for the given declaration. This is one that is formerly-canonical (or still canonical) and whose module did not import any other key declaration of the entity. More... | |
const Decl * | getKeyDeclaration (const Decl *D) |
template<typename Fn > | |
void | forEachImportedKeyDecl (const Decl *D, Fn Visit) |
Run a callback on each imported key declaration of D . More... | |
ASTReader (Preprocessor &PP, ASTContext &Context, const PCHContainerReader &PCHContainerRdr, StringRef isysroot="", bool DisableValidation=false, bool AllowASTWithCompilerErrors=false, bool AllowConfigurationMismatch=false, bool ValidateSystemInputs=false, bool UseGlobalIndex=true, std::unique_ptr< llvm::Timer > ReadTimer={}) | |
Load the AST file and validate its contents against the given Preprocessor. More... | |
~ASTReader () override | |
SourceManager & | getSourceManager () const |
FileManager & | getFileManager () const |
ASTReadResult | ReadAST (const std::string &FileName, ModuleKind Type, SourceLocation ImportLoc, unsigned ClientLoadCapabilities) |
Load the AST file designated by the given file name. More... | |
void | makeModuleVisible (Module *Mod, Module::NameVisibilityKind NameVisibility, SourceLocation ImportLoc) |
Make the entities in the given module and any of its (non-explicit) submodules visible to name lookup. More... | |
void | makeNamesVisible (const HiddenNames &Names, Module *Owner) |
Make the names within this set of hidden names visible. More... | |
std::unique_ptr < ASTReaderListener > | takeListener () |
Take the AST callbacks listener. More... | |
void | setListener (std::unique_ptr< ASTReaderListener > Listener) |
Set the AST callbacks listener. More... | |
void | addListener (std::unique_ptr< ASTReaderListener > L) |
Add an AST callback listener. More... | |
void | setDeserializationListener (ASTDeserializationListener *Listener, bool TakeOwnership=false) |
Set the AST deserialization listener. More... | |
bool | hasGlobalIndex () const |
Determine whether this AST reader has a global index. More... | |
GlobalModuleIndex * | getGlobalIndex () |
Return global module index. More... | |
void | resetForReload () |
Reset reader for a reload try. More... | |
bool | loadGlobalIndex () |
Attempts to load the global index. More... | |
bool | isGlobalIndexUnavailable () const |
Determine whether we tried to load the global index, but failed, e.g., because it is out-of-date or does not exist. More... | |
void | InitializeContext () |
Initializes the ASTContext. More... | |
void | UpdateSema () |
Update the state of Sema after loading some additional modules. More... | |
void | addInMemoryBuffer (StringRef &FileName, std::unique_ptr< llvm::MemoryBuffer > Buffer) |
Add in-memory (virtual file) buffer. More... | |
void | finalizeForWriting () |
Finalizes the AST reader's state before writing an AST file to disk. More... | |
ModuleManager & | getModuleManager () |
Retrieve the module manager. More... | |
Preprocessor & | getPreprocessor () const |
Retrieve the preprocessor. More... | |
StringRef | getOriginalSourceFile () |
Retrieve the name of the original source file name for the primary module file. More... | |
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. More... | |
PreprocessedEntity * | ReadPreprocessedEntity (unsigned Index) override |
Read a preallocated preprocessed entity from the external source. More... | |
std::pair< unsigned, unsigned > | findPreprocessedEntitiesInRange (SourceRange Range) override |
Returns a pair of [Begin, End) indices of preallocated preprocessed entities that Range encompasses. More... | |
Optional< bool > | isPreprocessedEntityInFileID (unsigned Index, FileID FID) override |
Optionally returns true or false if the preallocated preprocessed entity with index Index came from file FID . More... | |
HeaderFileInfo | GetHeaderFileInfo (const FileEntry *FE) override |
Read the header file information for the given file entry. More... | |
void | ReadPragmaDiagnosticMappings (DiagnosticsEngine &Diag) |
unsigned | getTotalNumSLocs () const |
Returns the number of source locations found in the chain. More... | |
unsigned | getTotalNumIdentifiers () const |
Returns the number of identifiers found in the chain. More... | |
unsigned | getTotalNumMacros () const |
Returns the number of macros found in the chain. More... | |
unsigned | getTotalNumTypes () const |
Returns the number of types found in the chain. More... | |
unsigned | getTotalNumDecls () const |
Returns the number of declarations found in the chain. More... | |
unsigned | getTotalNumSubmodules () const |
Returns the number of submodules known. More... | |
unsigned | getTotalNumSelectors () const |
Returns the number of selectors found in the chain. More... | |
unsigned | getTotalNumPreprocessedEntities () const |
Returns the number of preprocessed entities known to the AST reader. More... | |
TemplateArgumentLocInfo | GetTemplateArgumentLocInfo (ModuleFile &F, TemplateArgument::ArgKind Kind, const RecordData &Record, unsigned &Idx) |
Reads a TemplateArgumentLocInfo appropriate for the given TemplateArgument kind. More... | |
TemplateArgumentLoc | ReadTemplateArgumentLoc (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
Reads a TemplateArgumentLoc. More... | |
const ASTTemplateArgumentListInfo * | ReadASTTemplateArgumentListInfo (ModuleFile &F, const RecordData &Record, unsigned &Index) |
TypeSourceInfo * | GetTypeSourceInfo (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
Reads a declarator info from the given record. More... | |
QualType | GetType (serialization::TypeID ID) |
Resolve a type ID into a type, potentially building a new type. More... | |
QualType | getLocalType (ModuleFile &F, unsigned LocalID) |
Resolve a local type ID within a given AST file into a type. More... | |
serialization::TypeID | getGlobalTypeID (ModuleFile &F, unsigned LocalID) const |
Map a local type ID within a given AST file into a global type ID. More... | |
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. More... | |
serialization::DeclID | getGlobalDeclID (ModuleFile &F, serialization::LocalDeclID LocalID) const |
Map from a local declaration ID within a given module to a global declaration ID. More... | |
bool | isDeclIDFromModule (serialization::GlobalDeclID ID, ModuleFile &M) const |
Returns true if global DeclID ID originated from module M . More... | |
ModuleFile * | getOwningModuleFile (const Decl *D) |
Retrieve the module file that owns the given declaration, or NULL if the declaration is not from a module file. More... | |
std::string | getOwningModuleNameForDiagnostic (const Decl *D) |
Get the best name we know for the module that owns the given declaration, or an empty string if the declaration is not from a module. More... | |
SourceLocation | getSourceLocationForDeclID (serialization::GlobalDeclID ID) |
Returns the source location for the decl ID . More... | |
Decl * | GetDecl (serialization::DeclID ID) |
Resolve a declaration ID into a declaration, potentially building a new declaration. More... | |
Decl * | GetExternalDecl (uint32_t ID) override |
Resolve a declaration ID into a declaration, potentially building a new declaration. More... | |
Decl * | GetExistingDecl (serialization::DeclID ID) |
Resolve a declaration ID into a declaration. Return 0 if it's not been loaded yet. More... | |
Decl * | GetLocalDecl (ModuleFile &F, uint32_t LocalID) |
Reads a declaration with the given local ID in the given module. More... | |
template<typename T > | |
T * | GetLocalDeclAs (ModuleFile &F, uint32_t LocalID) |
Reads a declaration with the given local ID in the given module. More... | |
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. More... | |
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. More... | |
Decl * | ReadDecl (ModuleFile &F, const RecordData &R, unsigned &I) |
Reads a declaration from the given position in a record in the given module. More... | |
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. More... | |
void | CompleteRedeclChain (const Decl *D) override |
If any redeclarations of D have been imported since it was last checked, this digs out those redeclarations and adds them to the redeclaration chain for D . More... | |
uint64_t | readCXXBaseSpecifiers (ModuleFile &M, const RecordData &Record, unsigned &Idx) |
Read a CXXBaseSpecifiers ID form the given record and return its global bit offset. More... | |
CXXBaseSpecifier * | GetExternalCXXBaseSpecifiers (uint64_t Offset) override |
Resolve the offset of a set of C++ base specifiers in the decl stream into an array of specifiers. More... | |
Stmt * | GetExternalDeclStmt (uint64_t Offset) override |
Resolve the offset of a statement into a statement. More... | |
bool | ReadBlockAbbrevs (llvm::BitstreamCursor &Cursor, unsigned BlockID) |
bool | FindExternalVisibleDeclsByName (const DeclContext *DC, DeclarationName Name) override |
Finds all the visible declarations with a given name. The current implementation of this method just loads the entire lookup table as unmaterialized references. More... | |
ExternalLoadResult | FindExternalLexicalDecls (const DeclContext *DC, bool(*isKindWeWant)(Decl::Kind), SmallVectorImpl< Decl * > &Decls) override |
Read all of the declarations lexically stored in a declaration context. More... | |
void | FindFileRegionDecls (FileID File, unsigned Offset, unsigned Length, SmallVectorImpl< Decl * > &Decls) override |
Get the decls that are contained in a file in the Offset/Length range. Length can be 0 to indicate a point at Offset instead of a range. More... | |
void | StartedDeserializing () override |
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. More... | |
void | FinishedDeserializing () override |
Notify ASTReader that we finished the deserialization of a decl or type. Must be paired with StartedDeserializing. More... | |
void | StartTranslationUnit (ASTConsumer *Consumer) override |
Function that will be invoked when we begin parsing a new translation unit involving this external AST source. More... | |
void | PrintStats () override |
Print some statistics about AST usage. More... | |
void | dump () |
Dump information about the AST reader to standard error. More... | |
void | getMemoryBufferSizes (MemoryBufferSizes &sizes) const override |
void | InitializeSema (Sema &S) override |
Initialize the semantic source with the Sema instance being used to perform semantic analysis on the abstract syntax tree. More... | |
void | ForgetSema () override |
Inform the semantic consumer that Sema is no longer available. More... | |
virtual IdentifierInfo * | get (const char *NameStart, const char *NameEnd) |
Retrieve the IdentifierInfo for the named identifier. More... | |
IdentifierInfo * | get (StringRef Name) override |
Return the IdentifierInfo for the specified named identifier. More... | |
IdentifierIterator * | getIdentifiers () override |
Retrieve an iterator into the set of all identifiers in all loaded AST files. More... | |
void | ReadMethodPool (Selector Sel) override |
Load the contents of the global method pool for a given selector. More... | |
void | ReadKnownNamespaces (SmallVectorImpl< NamespaceDecl * > &Namespaces) override |
Load the set of namespaces that are known to the external source, which will be used during typo correction. More... | |
void | ReadUndefinedButUsed (llvm::DenseMap< NamedDecl *, SourceLocation > &Undefined) override |
Load the set of used but not defined functions or variables with internal linkage, or used but not defined internal functions. More... | |
void | ReadMismatchingDeleteExpressions (llvm::MapVector< FieldDecl *, llvm::SmallVector< std::pair< SourceLocation, bool >, 4 >> &Exprs) override |
void | ReadTentativeDefinitions (SmallVectorImpl< VarDecl * > &TentativeDefs) override |
Read the set of tentative definitions known to the external Sema source. More... | |
void | ReadUnusedFileScopedDecls (SmallVectorImpl< const DeclaratorDecl * > &Decls) override |
Read the set of unused file-scope declarations known to the external Sema source. More... | |
void | ReadDelegatingConstructors (SmallVectorImpl< CXXConstructorDecl * > &Decls) override |
Read the set of delegating constructors known to the external Sema source. More... | |
void | ReadExtVectorDecls (SmallVectorImpl< TypedefNameDecl * > &Decls) override |
Read the set of ext_vector type declarations known to the external Sema source. More... | |
void | ReadUnusedLocalTypedefNameCandidates (llvm::SmallSetVector< const TypedefNameDecl *, 4 > &Decls) override |
Read the set of potentially unused typedefs known to the source. More... | |
void | ReadReferencedSelectors (SmallVectorImpl< std::pair< Selector, SourceLocation > > &Sels) override |
Read the set of referenced selectors known to the external Sema source. More... | |
void | ReadWeakUndeclaredIdentifiers (SmallVectorImpl< std::pair< IdentifierInfo *, WeakInfo > > &WI) override |
Read the set of weak, undeclared identifiers known to the external Sema source. More... | |
void | ReadUsedVTables (SmallVectorImpl< ExternalVTableUse > &VTables) override |
Read the set of used vtables known to the external Sema source. More... | |
void | ReadPendingInstantiations (SmallVectorImpl< std::pair< ValueDecl *, SourceLocation > > &Pending) override |
Read the set of pending instantiations known to the external Sema source. More... | |
void | ReadLateParsedTemplates (llvm::MapVector< const FunctionDecl *, LateParsedTemplate * > &LPTMap) override |
Read the set of late parsed template functions for this source. More... | |
void | LoadSelector (Selector Sel) |
Load a selector from disk, registering its ID if it exists. More... | |
void | SetIdentifierInfo (unsigned ID, IdentifierInfo *II) |
void | SetGloballyVisibleDecls (IdentifierInfo *II, const SmallVectorImpl< uint32_t > &DeclIDs, SmallVectorImpl< Decl * > *Decls=nullptr) |
Set the globally-visible declarations associated with the given identifier. More... | |
DiagnosticBuilder | Diag (unsigned DiagID) |
Report a diagnostic. More... | |
DiagnosticBuilder | Diag (SourceLocation Loc, unsigned DiagID) |
Report a diagnostic. More... | |
IdentifierInfo * | DecodeIdentifierInfo (serialization::IdentifierID ID) |
IdentifierInfo * | GetIdentifierInfo (ModuleFile &M, const RecordData &Record, unsigned &Idx) |
IdentifierInfo * | GetIdentifier (serialization::IdentifierID ID) override |
IdentifierInfo * | getLocalIdentifier (ModuleFile &M, unsigned LocalID) |
serialization::IdentifierID | getGlobalIdentifierID (ModuleFile &M, unsigned LocalID) |
void | resolvePendingMacro (IdentifierInfo *II, const PendingMacroInfo &PMInfo) |
MacroInfo * | getMacro (serialization::MacroID ID) |
Retrieve the macro with the given ID. More... | |
serialization::MacroID | getGlobalMacroID (ModuleFile &M, unsigned LocalID) |
Retrieve the global macro ID corresponding to the given local ID within the given module file. More... | |
bool | ReadSLocEntry (int ID) override |
Read the source location entry with index ID. More... | |
std::pair< SourceLocation, StringRef > | getModuleImportLoc (int ID) override |
Retrieve the module import location and module name for the given source manager entry ID. More... | |
serialization::SubmoduleID | getGlobalSubmoduleID (ModuleFile &M, unsigned LocalID) |
Retrieve the global submodule ID given a module and its local ID number. More... | |
Module * | getSubmodule (serialization::SubmoduleID GlobalID) |
Retrieve the submodule that corresponds to a global submodule ID. More... | |
Module * | getModule (unsigned ID) override |
Retrieve the module that corresponds to the given module ID. More... | |
llvm::Optional < ASTSourceDescriptor > | getSourceDescriptor (unsigned ID) override |
Return a descriptor for the corresponding module. More... | |
ASTSourceDescriptor | getSourceDescriptor (const Module &M) override |
Return a descriptor for the module. More... | |
Selector | getLocalSelector (ModuleFile &M, unsigned LocalID) |
Retrieve a selector from the given module with its local ID number. More... | |
Selector | DecodeSelector (serialization::SelectorID Idx) |
Selector | GetExternalSelector (serialization::SelectorID ID) override |
Resolve a selector ID into a selector. More... | |
uint32_t | GetNumExternalSelectors () override |
Returns the number of selectors known to the external AST source. More... | |
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. More... | |
DeclarationName | ReadDeclarationName (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
Read a declaration name. More... | |
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. More... | |
TemplateArgument | ReadTemplateArgument (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
Read a template argument. More... | |
TemplateParameterList * | ReadTemplateParameterList (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
Read a template parameter list. More... | |
void | ReadTemplateArgumentList (SmallVectorImpl< TemplateArgument > &TemplArgs, ModuleFile &F, const RecordData &Record, unsigned &Idx) |
Read a template argument array. More... | |
void | ReadUnresolvedSet (ModuleFile &F, LazyASTUnresolvedSet &Set, const RecordData &Record, unsigned &Idx) |
Read a UnresolvedSet structure. More... | |
CXXBaseSpecifier | ReadCXXBaseSpecifier (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
Read a C++ base specifier. More... | |
CXXCtorInitializer ** | ReadCXXCtorInitializers (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
Read a CXXCtorInitializer array. More... | |
uint64_t | ReadCXXCtorInitializersRef (ModuleFile &M, const RecordData &Record, unsigned &Idx) |
Read a CXXCtorInitializers ID from the given record and return its global bit offset. More... | |
CXXCtorInitializer ** | GetExternalCXXCtorInitializers (uint64_t Offset) override |
Read the contents of a CXXCtorInitializer array. More... | |
SourceLocation | ReadSourceLocation (ModuleFile &ModuleFile, unsigned Raw) const |
Read a source location from raw form. More... | |
SourceLocation | ReadSourceLocation (ModuleFile &ModuleFile, const RecordDataImpl &Record, unsigned &Idx) |
Read a source location. More... | |
SourceRange | ReadSourceRange (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
Read a source range. More... | |
llvm::APInt | ReadAPInt (const RecordData &Record, unsigned &Idx) |
Read an integral value. More... | |
llvm::APSInt | ReadAPSInt (const RecordData &Record, unsigned &Idx) |
Read a signed integral value. More... | |
llvm::APFloat | ReadAPFloat (const RecordData &Record, const llvm::fltSemantics &Sem, unsigned &Idx) |
Read a floating-point value. More... | |
std::string | ReadPath (ModuleFile &F, const RecordData &Record, unsigned &Idx) |
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. More... | |
Stmt * | ReadStmt (ModuleFile &F) |
Reads a statement. More... | |
Expr * | ReadExpr (ModuleFile &F) |
Reads an expression. More... | |
Stmt * | ReadSubStmt () |
Reads a sub-statement operand during statement reading. More... | |
Expr * | ReadSubExpr () |
Reads a sub-expression operand during statement reading. More... | |
Token | ReadToken (ModuleFile &M, const RecordDataImpl &Record, unsigned &Idx) |
Reads a token out of a record. More... | |
MacroInfo * | ReadMacroRecord (ModuleFile &F, uint64_t Offset) |
Reads the macro record located at the given offset. More... | |
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. More... | |
void | addPendingMacro (IdentifierInfo *II, ModuleFile *M, uint64_t MacroDirectivesOffset) |
Add a macro to deserialize its macro directive history. More... | |
void | ReadDefinedMacros () override |
Read the set of macros defined by this external macro source. More... | |
void | updateOutOfDateIdentifier (IdentifierInfo &II) override |
Update an out-of-date identifier. More... | |
void | markIdentifierUpToDate (IdentifierInfo *II) |
Note that this identifier is up-to-date. More... | |
void | completeVisibleDeclsMap (const DeclContext *DC) override |
Load all external visible decls in the given DeclContext. More... | |
ASTContext & | getContext () |
Retrieve the AST context that this AST reader supplements. More... | |
Sema * | getSema () |
Retrieve the semantic analysis object used to analyze the translation unit in which the precompiled header is being imported. More... | |
IdentifierTable & | getIdentifierTable () |
Retrieve the identifier table associated with the preprocessor. More... | |
void | RecordSwitchCaseID (SwitchCase *SC, unsigned ID) |
Record that the given ID maps to the given switch-case statement. More... | |
SwitchCase * | getSwitchCaseWithID (unsigned ID) |
Retrieve the switch-case statement with the given ID. More... | |
void | ClearSwitchCaseIDs () |
void | ReadComments () override |
Loads comment ranges. More... | |
void | getInputFiles (ModuleFile &F, SmallVectorImpl< serialization::InputFile > &Files) |
Return all input files for the given module file. More... | |
![]() | |
virtual | ~ExternalPreprocessorSource () |
virtual IdentifierInfo * | GetIdentifier (unsigned ID)=0 |
Return the identifier associated with the given ID number. More... | |
![]() | |
virtual | ~ExternalPreprocessingRecordSource () |
![]() | |
virtual | ~ExternalHeaderFileInfoSource () |
![]() | |
ExternalSemaSource () | |
~ExternalSemaSource () override | |
virtual bool | LookupUnqualified (LookupResult &R, Scope *S) |
Do last resort, unqualified lookup on a LookupResult that Sema cannot find. More... | |
virtual TypoCorrection | CorrectTypo (const DeclarationNameInfo &Typo, int LookupKind, Scope *S, CXXScopeSpec *SS, CorrectionCandidateCallback &CCC, DeclContext *MemberContext, bool EnteringContext, const ObjCObjectPointerType *OPT) |
Try to "correct" a typo in the source code by finding visible declarations whose names are similar to the name that was present in the source code. More... | |
virtual bool | MaybeDiagnoseMissingCompleteType (SourceLocation Loc, QualType T) |
Produces a diagnostic note if the external source contains a complete definition for T . More... | |
![]() | |
ExternalASTSource () | |
virtual | ~ExternalASTSource () |
uint32_t | getGeneration () const |
Get the current generation of this AST source. This number is incremented each time the AST source lazily extends an existing entity. More... | |
ExternalLoadResult | FindExternalLexicalDecls (const DeclContext *DC, SmallVectorImpl< Decl * > &Result) |
Finds all declarations lexically contained within the given DeclContext. More... | |
template<typename DeclTy > | |
ExternalLoadResult | FindExternalLexicalDeclsBy (const DeclContext *DC, SmallVectorImpl< Decl * > &Result) |
virtual void | CompleteType (TagDecl *Tag) |
Gives the external AST source an opportunity to complete an incomplete type. More... | |
virtual void | CompleteType (ObjCInterfaceDecl *Class) |
Gives the external AST source an opportunity to complete an incomplete Objective-C class. More... | |
virtual bool | layoutRecordType (const RecordDecl *Record, uint64_t &Size, uint64_t &Alignment, llvm::DenseMap< const FieldDecl *, uint64_t > &FieldOffsets, llvm::DenseMap< const CXXRecordDecl *, CharUnits > &BaseOffsets, llvm::DenseMap< const CXXRecordDecl *, CharUnits > &VirtualBaseOffsets) |
Perform layout on the given record. More... | |
MemoryBufferSizes | getMemoryBufferSizes () const |
![]() | |
virtual | ~IdentifierInfoLookup () |
![]() | |
virtual | ~ExternalSLocEntrySource () |
Static Public Member Functions | |
static void | ResolveImportedPath (std::string &Filename, StringRef Prefix) |
static std::string | getOriginalSourceFile (const std::string &ASTFileName, FileManager &FileMgr, const PCHContainerReader &PCHContainerRdr, DiagnosticsEngine &Diags) |
Retrieve the name of the original source file name directly from the AST file, without actually loading the AST file. More... | |
static bool | readASTFileControlBlock (StringRef Filename, FileManager &FileMgr, const PCHContainerReader &PCHContainerRdr, ASTReaderListener &Listener) |
Read the control block for the named AST file. More... | |
static bool | isAcceptableASTFile (StringRef Filename, FileManager &FileMgr, const PCHContainerReader &PCHContainerRdr, const LangOptions &LangOpts, const TargetOptions &TargetOpts, const PreprocessorOptions &PPOpts, std::string ExistingModuleCachePath) |
Determine whether the given AST file is acceptable to load into a translation unit with the given language and target options. More... | |
static std::string | ReadString (const RecordData &Record, unsigned &Idx) |
static VersionTuple | ReadVersionTuple (const RecordData &Record, unsigned &Idx) |
Read a version tuple. More... | |
![]() | |
static bool | classof (const ExternalASTSource *Source) |
Public Attributes | |
SmallVector< uint64_t, 16 > | PreloadedDeclIDs |
SmallVector< std::pair < llvm::BitstreamCursor, serialization::ModuleFile * >, 8 > | CommentsCursors |
Cursors for comments blocks. More... | |
Friends | |
class | PCHValidator |
Types of AST files. More... | |
class | ASTDeclReader |
class | ASTStmtReader |
class | ASTIdentifierIterator |
class | serialization::reader::ASTIdentifierLookupTrait |
class | TypeLocReader |
class | ASTWriter |
class | ASTUnit |
class | serialization::ReadMethodPoolVisitor |
Additional Inherited Members | |
![]() | |
uint32_t | incrementGeneration (ASTContext &C) |
Increment the current generation. More... | |
![]() | |
static DeclContextLookupResult | SetExternalVisibleDeclsForName (const DeclContext *DC, DeclarationName Name, ArrayRef< NamedDecl * > Decls) |
static DeclContextLookupResult | SetNoExternalVisibleDeclsForName (const DeclContext *DC, DeclarationName Name) |
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 302 of file ASTReader.h.
Definition at line 352 of file ASTReader.h.
Definition at line 347 of file ASTReader.h.
Definition at line 351 of file ASTReader.h.
Definition at line 348 of file ASTReader.h.
Definition at line 349 of file ASTReader.h.
Definition at line 353 of file ASTReader.h.
typedef SmallVector<uint64_t, 64> clang::ASTReader::RecordData |
Definition at line 311 of file ASTReader.h.
typedef SmallVectorImpl<uint64_t> clang::ASTReader::RecordDataImpl |
Definition at line 312 of file ASTReader.h.
The result of reading the control block of an AST file, which can fail for various reasons.
Definition at line 316 of file ASTReader.h.
Flags that indicate what kind of AST loading failures the client of the AST reader can directly handle.
When a client states that it can handle a particular kind of failure, the AST reader will not emit errors when producing that kind of failure.
Definition at line 1309 of file ASTReader.h.
ASTReader::ASTReader | ( | Preprocessor & | PP, |
ASTContext & | Context, | ||
const PCHContainerReader & | PCHContainerRdr, | ||
StringRef | isysroot = "" , |
||
bool | DisableValidation = false , |
||
bool | AllowASTWithCompilerErrors = false , |
||
bool | AllowConfigurationMismatch = false , |
||
bool | ValidateSystemInputs = false , |
||
bool | UseGlobalIndex = true , |
||
std::unique_ptr< llvm::Timer > | ReadTimer = {} |
||
) |
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. |
PCHContainerOps | the PCHContainerOperations to use for loading and creating modules. |
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. |
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. |
AllowConfigurationMismatch | If true, the AST reader will not check for configuration differences between the AST file and the invocation. |
ValidateSystemInputs | If true, the AST reader will validate system input files in addition to user input files. This is only meaningful if DisableValidation is false. |
UseGlobalIndex | If true, the AST reader will try to load and use the global module index. |
ReadTimer | If non-null, a timer used to track the time spent deserializing. |
Definition at line 8474 of file ASTReader.cpp.
References clang::SourceManager::setExternalSLocEntrySource().
|
override |
Definition at line 8506 of file ASTReader.cpp.
|
inline |
Add in-memory (virtual file) buffer.
Definition at line 1433 of file ASTReader.h.
References clang::serialization::ModuleManager::addInMemoryBuffer().
|
inline |
Add an AST callback listener.
Takes ownership of L
.
Definition at line 1373 of file ASTReader.h.
Referenced by clang::DependencyCollector::attachToASTReader(), clang::DependencyFileGenerator::AttachToASTReader(), and clang::ModuleDependencyCollector::attachToASTReader().
void ASTReader::addPendingMacro | ( | IdentifierInfo * | II, |
ModuleFile * | M, | ||
uint64_t | MacroDirectivesOffset | ||
) |
Add a macro to deserialize its macro directive history.
II | The name of the macro. |
M | The module file. |
MacroDirectivesOffset | Offset of the serialized macro directive history. |
Definition at line 1587 of file ASTReader.cpp.
void ASTReader::ClearSwitchCaseIDs | ( | ) |
Definition at line 8018 of file ASTReader.cpp.
|
overridevirtual |
If any redeclarations of D
have been imported since it was last checked, this digs out those redeclarations and adds them to the redeclaration chain for D
.
Reimplemented from clang::ExternalASTSource.
Definition at line 5872 of file ASTReader.cpp.
References clang::DeclContext::decls_begin(), clang::Decl::getDeclContext(), clang::DeclContext::getRedeclContext(), clang::DeclContext::lookup(), and clang::serialization::needsAnonymousDeclarationNumber().
|
overridevirtual |
Load all external visible decls in the given DeclContext.
Reimplemented from clang::ExternalASTSource.
Definition at line 6532 of file ASTReader.cpp.
References Contexts, clang::DeclContext::hasExternalVisibleStorage(), clang::DeclContext::isFileContext(), and clang::DeclContext::isNamespace().
IdentifierInfo * ASTReader::DecodeIdentifierInfo | ( | serialization::IdentifierID | ID | ) |
Definition at line 7269 of file ASTReader.cpp.
References clang::ContinuousRangeMap< Int, V, InitialCapacity >::end(), clang::ContinuousRangeMap< Int, V, InitialCapacity >::find(), clang::IdentifierTable::get(), clang::Preprocessor::getIdentifierTable(), and clang::ASTDeserializationListener::IdentifierRead().
Referenced by GetIdentifier(), GetIdentifierInfo(), getLocalIdentifier(), and ReadWeakUndeclaredIdentifiers().
Selector ASTReader::DecodeSelector | ( | serialization::SelectorID | Idx | ) |
Definition at line 7422 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 7990 of file ASTReader.cpp.
DiagnosticBuilder ASTReader::Diag | ( | SourceLocation | Loc, |
unsigned | DiagID | ||
) |
Report a diagnostic.
Definition at line 7994 of file ASTReader.cpp.
References clang::DiagnosticsEngine::Report().
void ASTReader::dump | ( | ) |
Dump information about the AST reader to standard error.
Definition at line 6736 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 3810 of file ASTReader.cpp.
|
overridevirtual |
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 6213 of file ASTReader.cpp.
References clang::ELR_Success.
|
overridevirtual |
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 6418 of file ASTReader.cpp.
References Context, Contexts, clang::DeclContext::hasExternalVisibleStorage(), and clang::DeclContext::isNamespace().
|
overridevirtual |
Get the decls that are contained in a file in the Offset/Length range. Length
can be 0 to indicate a point at Offset
instead of a range.
Reimplemented from clang::ExternalASTSource.
Definition at line 6258 of file ASTReader.cpp.
References clang::SourceManager::getLocForStartOfFile(), and clang::SourceLocation::getLocWithOffset().
|
overridevirtual |
Returns a pair of [Begin, End) indices of preallocated preprocessed entities that Range
encompasses.
Returns a pair of [Begin, End) indices of preallocated preprocessed entities that.
Implements clang::ExternalPreprocessingRecordSource.
Definition at line 4806 of file ASTReader.cpp.
References clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::SourceManager::isBeforeInTranslationUnit(), clang::SourceRange::isInvalid(), and SourceMgr.
|
overridevirtual |
Notify ASTReader that we finished the deserialization of a decl or type. Must be paired with StartedDeserializing.
Reimplemented from clang::ExternalASTSource.
Definition at line 8414 of file ASTReader.cpp.
References clang::Sema::UpdateExceptionSpec(), and Updates.
|
inline |
Run a callback on each imported key declaration of D
.
Definition at line 1082 of file ASTReader.h.
References clang::Decl::getCanonicalDecl(), GetExistingDecl(), and clang::Decl::isFromASTFile().
|
inlineoverridevirtual |
Inform the semantic consumer that Sema is no longer available.
Reimplemented from clang::ExternalSemaSource.
Definition at line 1750 of file ASTReader.h.
|
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 6827 of file ASTReader.cpp.
|
inlineoverridevirtual |
Return the IdentifierInfo 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 1759 of file ASTReader.h.
|
inline |
Retrieve the AST context that this AST reader supplements.
Definition at line 2057 of file ASTReader.h.
Referenced by clang::ASTDeclReader::attachPreviousDecl(), clang::ASTDeclReader::mergeDefinitionVisibility(), and clang::ASTDeclReader::UpdateDecl().
Decl * ASTReader::GetDecl | ( | serialization::DeclID | ID | ) |
Resolve a declaration ID into a declaration, potentially building a new declaration.
Definition at line 6094 of file ASTReader.cpp.
References clang::serialization::NUM_PREDEF_DECL_IDS.
Referenced by GetLocalDecl(), ReadDecl(), ReadDeclAs(), ReadDelegatingConstructors(), ReadExtVectorDecls(), ReadKnownNamespaces(), ReadLateParsedTemplates(), ReadMismatchingDeleteExpressions(), ReadPendingInstantiations(), ReadTentativeDefinitions(), ReadUndefinedButUsed(), ReadUnusedFileScopedDecls(), ReadUnusedLocalTypedefNameCandidates(), ReadUsedVTables(), and SetGloballyVisibleDecls().
Decl * ASTReader::GetExistingDecl | ( | serialization::DeclID | ID | ) |
Resolve a declaration ID into a declaration. Return 0 if it's not been loaded yet.
Definition at line 6070 of file ASTReader.cpp.
References Context, clang::Decl::getCanonicalDecl(), getPredefinedDecl(), and clang::serialization::NUM_PREDEF_DECL_IDS.
Referenced by forEachImportedKeyDecl(), and getKeyDeclaration().
|
overridevirtual |
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 5960 of file ASTReader.cpp.
References clang::ASTContext::Allocate(), Context, and clang::serialization::DECL_CXX_BASE_SPECIFIERS.
|
overridevirtual |
Read the contents of a CXXCtorInitializer array.
Reimplemented from clang::ExternalASTSource.
Definition at line 5929 of file ASTReader.cpp.
References clang::serialization::DECL_CXX_CTOR_INITIALIZERS.
|
overridevirtual |
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 5862 of file ASTReader.cpp.
|
overridevirtual |
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 6148 of file ASTReader.cpp.
|
overridevirtual |
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 7447 of file ASTReader.cpp.
References DecodeSelector().
|
inline |
Definition at line 1302 of file ASTReader.h.
Referenced by clang::serialization::reader::HeaderFileInfoTrait::EqualKey().
serialization::DeclID ASTReader::getGlobalDeclID | ( | ModuleFile & | F, |
serialization::LocalDeclID | LocalID | ||
) | const |
Map from a local declaration ID within a given module to a global declaration ID.
Definition at line 5984 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 7307 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().
|
inline |
Return global module index.
Definition at line 1412 of file ASTReader.h.
MacroID ASTReader::getGlobalMacroID | ( | ModuleFile & | M, |
unsigned | LocalID | ||
) |
Retrieve the global macro ID corresponding to the given local ID within the given module file.
Definition at line 7345 of file ASTReader.cpp.
References clang::ContinuousRangeMap< Int, V, InitialCapacity >::end(), clang::ContinuousRangeMap< Int, V, InitialCapacity >::find(), clang::serialization::ModuleFile::MacroRemap, and clang::serialization::NUM_PREDEF_MACRO_IDS.
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 1469 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 7457 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 7357 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 5785 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.
|
overridevirtual |
Read the header file information for the given file entry.
Implements clang::ExternalHeaderFileInfoSource.
Definition at line 4872 of file ASTReader.cpp.
|
inlineoverride |
Definition at line 1834 of file ASTReader.h.
References DecodeIdentifierInfo().
|
inline |
Definition at line 1829 of file ASTReader.h.
References DecodeIdentifierInfo(), and getGlobalIdentifierID().
Referenced by ReadDeclarationName(), ReadNestedNameSpecifier(), ReadNestedNameSpecifierLoc(), and ReadTemplateName().
|
overridevirtual |
Retrieve an iterator into the set of all identifiers in all loaded AST files.
Reimplemented from clang::IdentifierInfoLookup.
Definition at line 6905 of file ASTReader.cpp.
References ASTIdentifierIterator, and loadGlobalIndex().
IdentifierTable & ASTReader::getIdentifierTable | ( | ) |
Retrieve the identifier table associated with the preprocessor.
Definition at line 8000 of file ASTReader.cpp.
References clang::Preprocessor::getIdentifierTable().
void ASTReader::getInputFiles | ( | ModuleFile & | F, |
SmallVectorImpl< serialization::InputFile > & | Files | ||
) |
Return all input files for the given module file.
Definition at line 8073 of file ASTReader.cpp.
References clang::serialization::ModuleFile::InputFilesLoaded.
Returns the first key declaration for the given declaration. This is one that is formerly-canonical (or still canonical) and whose module did not import any other key declaration of the entity.
Definition at line 1066 of file ASTReader.h.
References clang::Decl::getCanonicalDecl(), GetExistingDecl(), and clang::Decl::isFromASTFile().
Referenced by getKeyDeclaration().
Definition at line 1076 of file ASTReader.h.
References getKeyDeclaration().
|
inline |
Reads a declaration with the given local ID in the given module.
Definition at line 1621 of file ASTReader.h.
References GetDecl(), and getGlobalDeclID().
Referenced by GetLocalDeclAs().
|
inline |
Reads a declaration with the given local ID in the given module.
Definition at line 1629 of file ASTReader.h.
References GetLocalDecl().
IdentifierInfo * ASTReader::getLocalIdentifier | ( | ModuleFile & | M, |
unsigned | LocalID | ||
) |
Definition at line 7303 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 7418 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 5780 of file ASTReader.cpp.
Referenced by readType().
MacroInfo * ASTReader::getMacro | ( | serialization::MacroID | ID | ) |
Retrieve the macro with the given ID.
Definition at line 7319 of file ASTReader.cpp.
References clang::ContinuousRangeMap< Int, V, InitialCapacity >::end(), clang::ContinuousRangeMap< Int, V, InitialCapacity >::find(), clang::ASTDeserializationListener::MacroRead(), clang::serialization::NUM_PREDEF_MACRO_IDS, and ReadMacroRecord().
|
overridevirtual |
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 6758 of file ASTReader.cpp.
References bytes(), clang::ExternalASTSource::MemoryBufferSizes::malloc_bytes, and clang::ExternalASTSource::MemoryBufferSizes::mmap_bytes.
Retrieve the module that corresponds to the given module ID.
Note: overrides method in ExternalASTSource
Implements clang::ExternalPreprocessorSource.
Definition at line 7383 of file ASTReader.cpp.
References getSubmodule().
|
overridevirtual |
Retrieve the module import location and module name for the given source manager entry ID.
Implements clang::ExternalSLocEntrySource.
Definition at line 1288 of file ASTReader.cpp.
References clang::serialization::ModuleFile::ImportLoc, clang::serialization::ModuleFile::Kind, clang::serialization::MK_ExplicitModule, clang::serialization::MK_ImplicitModule, and clang::serialization::ModuleFile::ModuleName.
|
inline |
Retrieve the module manager.
Definition at line 1446 of file ASTReader.h.
|
overridevirtual |
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 7451 of file ASTReader.cpp.
References getTotalNumSelectors().
|
inline |
Retrieve the name of the original source file name for the primary module file.
Definition at line 1453 of file ASTReader.h.
References clang::serialization::ModuleManager::getPrimaryModule(), and clang::serialization::ModuleFile::OriginalSourceFileName.
Referenced by AddImplicitIncludePCH(), and createInvocationForMigration().
|
static |
Retrieve the name of the original source file name directly from the AST file, without actually loading the AST file.
Definition at line 3873 of file ASTReader.cpp.
References clang::serialization::CONTROL_BLOCK_ID, clang::PCHContainerReader::ExtractPCH(), clang::FileManager::getBufferForFile(), clang::serialization::ORIGINAL_FILE, clang::DiagnosticsEngine::Report(), SkipCursorToBlock(), and startsWithASTFileMagic().
ModuleFile * ASTReader::getOwningModuleFile | ( | const 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 6005 of file ASTReader.cpp.
References clang::Decl::getGlobalID(), and clang::Decl::isFromASTFile().
Referenced by getDefinitiveModuleFileFor(), getOwningModuleNameForDiagnostic(), and ReadLateParsedTemplates().
std::string ASTReader::getOwningModuleNameForDiagnostic | ( | const Decl * | D | ) |
Get the best name we know for the module that owns the given declaration, or an empty string if the declaration is not from a module.
Definition at line 8081 of file ASTReader.cpp.
References clang::Decl::getImportedOwningModule(), getOwningModuleFile(), and clang::serialization::ModuleFile::ModuleName.
|
inline |
Retrieve the preprocessor.
Definition at line 1449 of file ASTReader.h.
|
inline |
Retrieve the semantic analysis object used to analyze the translation unit in which the precompiled header is being imported.
Definition at line 2066 of file ASTReader.h.
Referenced by ReadMethodPool().
|
overridevirtual |
Return a descriptor for the corresponding module.
Reimplemented from clang::ExternalASTSource.
Definition at line 7401 of file ASTReader.cpp.
References clang::serialization::ModuleFile::FileName, clang::serialization::ModuleManager::getPrimaryModule(), getSubmodule(), clang::None, clang::serialization::ModuleFile::OriginalDir, clang::serialization::ModuleFile::OriginalSourceFileName, clang::serialization::ModuleFile::Signature, and clang::serialization::ModuleManager::size().
|
overridevirtual |
Return a descriptor for the module.
Reimplemented from clang::ExternalASTSource.
Definition at line 7388 of file ASTReader.cpp.
References clang::Module::Directory, clang::Module::getASTFile(), clang::Module::getFullModuleName(), clang::DirectoryEntry::getName(), clang::FileEntry::getName(), and clang::Module::Signature.
SourceLocation ASTReader::getSourceLocationForDeclID | ( | serialization::GlobalDeclID | ID | ) |
Returns the source location for the decl ID
.
Definition at line 6013 of file ASTReader.cpp.
References clang::Decl::getLocation(), and clang::serialization::NUM_PREDEF_DECL_IDS.
|
inline |
Definition at line 1301 of file ASTReader.h.
Module * ASTReader::getSubmodule | ( | serialization::SubmoduleID | GlobalID | ) |
Retrieve the submodule that corresponds to a global submodule ID.
Definition at line 7369 of file ASTReader.cpp.
References clang::serialization::NUM_PREDEF_SUBMODULE_IDS.
Referenced by getModule(), getSourceDescriptor(), clang::ASTDeclReader::mergeDefinitionVisibility(), and clang::ASTDeclReader::UpdateDecl().
|
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 1484 of file ASTReader.h.
SwitchCase * ASTReader::getSwitchCaseWithID | ( | unsigned | ID | ) |
Retrieve the switch-case statement with the given ID.
Definition at line 8013 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 5801 of file ASTReader.cpp.
References clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgument::Integral, clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.
|
inline |
Returns the number of declarations found in the chain.
Definition at line 1528 of file ASTReader.h.
|
inline |
Returns the number of identifiers found in the chain.
Definition at line 1513 of file ASTReader.h.
|
inline |
Returns the number of macros found in the chain.
Definition at line 1518 of file ASTReader.h.
|
inline |
Returns the number of preprocessed entities known to the AST reader.
Definition at line 1544 of file ASTReader.h.
References clang::serialization::ModuleManager::begin(), clang::serialization::ModuleManager::end(), and clang::Result.
|
inline |
Returns the number of selectors found in the chain.
Definition at line 1538 of file ASTReader.h.
Referenced by GetNumExternalSelectors().
|
inline |
Returns the number of source locations found in the chain.
Definition at line 1508 of file ASTReader.h.
|
inline |
Returns the number of submodules known.
Definition at line 1533 of file ASTReader.h.
|
inline |
Returns the number of types found in the chain.
Definition at line 1523 of file ASTReader.h.
QualType ASTReader::GetType | ( | serialization::TypeID | ID | ) |
Resolve a type ID into a type, potentially building a new type.
Definition at line 5688 of file ASTReader.cpp.
References clang::ASTContext::ARCUnbridgedCastTy, clang::ASTContext::BoolTy, clang::ASTContext::BoundMemberTy, clang::ASTContext::BuiltinFnTy, clang::ASTContext::Char16Ty, clang::ASTContext::Char32Ty, clang::ASTContext::CharTy, Context, clang::ASTContext::DependentTy, clang::ASTContext::DoubleTy, clang::Qualifiers::FastMask, clang::Qualifiers::FastWidth, clang::ASTContext::FloatTy, clang::serialization::TypeIdx::fromTypeID(), clang::ASTContext::getAutoDeductType(), clang::ASTContext::getAutoRRefDeductType(), clang::ASTContext::getVaListTagType(), clang::ASTContext::HalfTy, clang::ASTContext::Int128Ty, clang::ASTContext::IntTy, clang::QualType::isNull(), clang::ASTContext::LongDoubleTy, clang::ASTContext::LongLongTy, clang::ASTContext::LongTy, clang::ASTContext::NullPtrTy, clang::serialization::NUM_PREDEF_TYPE_IDS, clang::ASTContext::ObjCBuiltinClassTy, clang::ASTContext::ObjCBuiltinIdTy, clang::ASTContext::ObjCBuiltinSelTy, clang::ASTContext::OCLEventTy, clang::ASTContext::OCLImage1dArrayTy, clang::ASTContext::OCLImage1dBufferTy, clang::ASTContext::OCLImage1dTy, clang::ASTContext::OCLImage2dArrayTy, clang::ASTContext::OCLImage2dTy, clang::ASTContext::OCLImage3dTy, clang::ASTContext::OCLSamplerTy, clang::ASTContext::OverloadTy, 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_BUILTIN_FN, 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_EVENT_ID, clang::serialization::PREDEF_TYPE_FLOAT_ID, clang::serialization::PREDEF_TYPE_HALF_ID, clang::serialization::PREDEF_TYPE_IMAGE1D_ARR_ID, clang::serialization::PREDEF_TYPE_IMAGE1D_BUFF_ID, clang::serialization::PREDEF_TYPE_IMAGE1D_ID, clang::serialization::PREDEF_TYPE_IMAGE2D_ARR_ID, clang::serialization::PREDEF_TYPE_IMAGE2D_ID, clang::serialization::PREDEF_TYPE_IMAGE3D_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_SAMPLER_ID, 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_VA_LIST_TAG, clang::serialization::PREDEF_TYPE_VOID_ID, clang::serialization::PREDEF_TYPE_WCHAR_ID, clang::ASTContext::PseudoObjectTy, clang::ASTContext::ShortTy, clang::ASTContext::SignedCharTy, clang::ASTContext::UnknownAnyTy, clang::ASTContext::UnsignedCharTy, clang::ASTContext::UnsignedInt128Ty, clang::ASTContext::UnsignedIntTy, clang::ASTContext::UnsignedLongLongTy, clang::ASTContext::UnsignedLongTy, clang::ASTContext::UnsignedShortTy, clang::ASTContext::VoidTy, clang::ASTContext::WCharTy, 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 5674 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().
|
inline |
Determine whether this AST reader has a global index.
Definition at line 1409 of file ASTReader.h.
void ASTReader::InitializeContext | ( | ) |
Initializes the ASTContext.
Definition at line 3676 of file ASTReader.cpp.
References clang::Module::AllVisible, Context, clang::Type::getAs(), clang::TagType::getDecl(), clang::ASTContext::getDiagnostics(), clang::ASTContext::getTranslationUnitDecl(), clang::QualType::isNull(), clang::serialization::NumSpecialTypeIDs, clang::serialization::PREDEF_DECL_TRANSLATION_UNIT_ID, clang::ASTContext::setCFConstantStringType(), clang::ASTContext::setcudaConfigureCallDecl(), clang::ASTContext::setFILEDecl(), clang::ASTContext::setjmp_bufDecl(), clang::ASTContext::setsigjmp_bufDecl(), clang::ASTContext::setucontext_tDecl(), 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.
|
overridevirtual |
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 6775 of file ASTReader.cpp.
References clang::Sema::addExternalSource(), clang::NamedDecl::getDeclName(), and S.
|
static |
Determine whether the given AST file is acceptable to load into a translation unit with the given language and target options.
Definition at line 4161 of file ASTReader.cpp.
Referenced by clang::FrontendAction::BeginSourceFile().
bool ASTReader::isDeclIDFromModule | ( | serialization::GlobalDeclID | ID, |
ModuleFile & | M | ||
) | const |
Returns true if global DeclID ID
originated from module M
.
Definition at line 5995 of file ASTReader.cpp.
References clang::serialization::ModuleFile::BaseDeclID, clang::serialization::ModuleFile::LocalNumDecls, and clang::serialization::NUM_PREDEF_DECL_IDS.
bool ASTReader::isGlobalIndexUnavailable | ( | ) | const |
Determine whether we tried to load the global index, but failed, e.g., because it is out-of-date or does not exist.
Definition at line 3330 of file ASTReader.cpp.
References Context, and clang::ASTContext::getLangOpts().
|
overridevirtual |
Optionally returns true or false if the preallocated preprocessed entity with index Index
came from file FID
.
Optionally returns true or false if the preallocated preprocessed entity with index.
Reimplemented from clang::ExternalPreprocessingRecordSource.
Definition at line 4819 of file ASTReader.cpp.
References clang::serialization::PPEntityOffset::Begin, clang::SourceManager::getFileLoc(), clang::SourceManager::isInFileID(), clang::FileID::isInvalid(), clang::SourceLocation::isInvalid(), clang::serialization::ModuleFile::PreprocessedEntityOffsets, and SourceMgr.
bool ASTReader::loadGlobalIndex | ( | ) |
Attempts to load the global index.
Definition at line 3308 of file ASTReader.cpp.
References Context, clang::ASTContext::getLangOpts(), and clang::GlobalModuleIndex::readIndex().
Referenced by getIdentifiers().
void ASTReader::LoadSelector | ( | Selector | Sel | ) |
Load a selector from disk, registering its ID if it exists.
Definition at line 7207 of file ASTReader.cpp.
References ReadMethodPool().
void ASTReader::makeModuleVisible | ( | Module * | Mod, |
Module::NameVisibilityKind | NameVisibility, | ||
SourceLocation | ImportLoc | ||
) |
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. |
NameVisibility | The level of visibility to give the names in the module. Visibility can only be increased over time. |
ImportLoc | The location at which the import occurs. |
Definition at line 3262 of file ASTReader.cpp.
References clang::Module::getExportedModules(), clang::Module::isAvailable(), clang::Module::NameVisibility, and Stack.
void ASTReader::makeNamesVisible | ( | const HiddenNames & | Names, |
Module * | Owner | ||
) |
Make the names within this set of hidden names visible.
Definition at line 3248 of file ASTReader.cpp.
References clang::Module::Hidden, moveMethodToBackOfGlobalList(), and clang::Module::NameVisibility.
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 6115 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 1725 of file ASTReader.cpp.
References clang::IdentifierInfo::setOutOfDate().
|
overridevirtual |
Print some statistics about AST usage.
Reimplemented from clang::ExternalASTSource.
Definition at line 6620 of file ASTReader.cpp.
References dump().
llvm::APFloat ASTReader::ReadAPFloat | ( | const RecordData & | Record, |
const llvm::fltSemantics & | Sem, | ||
unsigned & | Idx | ||
) |
llvm::APInt ASTReader::ReadAPInt | ( | const RecordData & | Record, |
unsigned & | Idx | ||
) |
Read an integral value.
Definition at line 7935 of file ASTReader.cpp.
References clang::Result.
Referenced by ReadAPFloat(), and ReadAPSInt().
llvm::APSInt ASTReader::ReadAPSInt | ( | const RecordData & | Record, |
unsigned & | Idx | ||
) |
Read a signed integral value.
Definition at line 7944 of file ASTReader.cpp.
References ReadAPInt().
Referenced by ReadTemplateArgument().
ASTReader::ASTReadResult ASTReader::ReadAST | ( | const std::string & | FileName, |
ModuleKind | Type, | ||
SourceLocation | ImportLoc, | ||
unsigned | ClientLoadCapabilities | ||
) |
Load the AST file designated by the given file name.
FileName | The name of the AST file to load. |
Type | The kind of AST being loaded, e.g., PCH, module, main file, or preamble. |
ImportLoc | the location where the module file will be considered as imported from. For non-module AST types it should be invalid. |
ClientLoadCapabilities | The set of client load-failure capabilities, represented as a bitset of the enumerators of LoadFailureCapabilities. |
Definition at line 3345 of file ASTReader.cpp.
References Context, clang::serialization::ModuleFile::DirectImportLoc, clang::ASTContext::getLangOpts(), clang::serialization::ModuleFile::GlobalBitOffset, clang::serialization::ModuleFile::ImportLoc, clang::FileID::isInvalid(), clang::Module::Conflict::Message, clang::serialization::MK_ImplicitModule, clang::serialization::MK_MainFile, clang::serialization::MK_Preamble, clang::serialization::ModuleFile::OriginalSourceFileID, clang::Module::Conflict::Other, clang::serialization::ModuleFile::PreloadSLocEntries, clang::SourceManager::setMainFileID(), clang::SourceManager::setPreambleFileID(), clang::serialization::ModuleFile::SizeInBits, clang::serialization::ModuleFile::SLocEntryBaseID, SourceMgr, and updateModuleTimestamp().
|
static |
Read the control block for the named AST file.
Definition at line 3968 of file ASTReader.cpp.
References clang::serialization::CONTROL_BLOCK_ID, clang::serialization::DIAGNOSTIC_OPTIONS, clang::PCHContainerReader::ExtractPCH(), clang::serialization::FILE_SYSTEM_OPTIONS, clang::FileManager::getBufferForFile(), clang::serialization::HEADER_SEARCH_OPTIONS, clang::serialization::IMPORTS, clang::serialization::INPUT_FILE, clang::serialization::INPUT_FILE_OFFSETS, clang::serialization::INPUT_FILES_BLOCK_ID, clang::serialization::KNOWN_MODULE_FILES, clang::serialization::LANGUAGE_OPTIONS, clang::serialization::METADATA, clang::serialization::MODULE_DIRECTORY, clang::serialization::MODULE_MAP_FILE, clang::serialization::MODULE_NAME, clang::ASTReaderListener::needsImportVisitation(), clang::ASTReaderListener::needsInputFileVisitation(), clang::ASTReaderListener::needsSystemInputFileVisitation(), clang::serialization::PREPROCESSOR_OPTIONS, clang::ASTReaderListener::ReadFullVersionInformation(), clang::ASTReaderListener::ReadModuleMapFile(), clang::ASTReaderListener::ReadModuleName(), SkipCursorToBlock(), startsWithASTFileMagic(), clang::serialization::TARGET_OPTIONS, clang::serialization::VERSION_MAJOR, clang::ASTReaderListener::visitImport(), and clang::ASTReaderListener::visitInputFile().
Referenced by clang::DumpModuleInfoAction::ExecuteAction(), and clang::CompilerInstance::loadModuleFile().
const ASTTemplateArgumentListInfo * ASTReader::ReadASTTemplateArgumentListInfo | ( | ModuleFile & | F, |
const RecordData & | Record, | ||
unsigned & | Index | ||
) |
Definition at line 5850 of file ASTReader.cpp.
References clang::TemplateArgumentListInfo::addArgument(), and clang::ASTTemplateArgumentListInfo::Create().
void ASTReader::ReadAttributes | ( | ModuleFile & | F, |
AttrVec & | Attrs, | ||
const RecordData & | Record, | ||
unsigned & | Idx | ||
) |
Reads attributes from the current stream position.
Definition at line 2372 of file ASTReaderDecl.cpp.
Referenced by clang::ASTDeclReader::UpdateDecl().
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 1325 of file ASTReader.cpp.
|
overridevirtual |
Loads comment ranges.
Reimplemented from clang::ExternalASTSource.
Definition at line 8022 of file ASTReader.cpp.
References clang::LangOptions::CommentOpts, clang::ASTContext::Comments, clang::serialization::COMMENTS_RAW_COMMENT, CommentsCursors, clang::serialized_diags::Error, clang::ASTContext::getLangOpts(), clang::CommentOptions::ParseAllComments, and ReadSourceRange().
CXXBaseSpecifier ASTReader::ReadCXXBaseSpecifier | ( | ModuleFile & | F, |
const RecordData & | Record, | ||
unsigned & | Idx | ||
) |
Read a C++ base specifier.
Definition at line 7708 of file ASTReader.cpp.
References GetTypeSourceInfo(), ReadSourceLocation(), ReadSourceRange(), clang::Result, 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 5948 of file ASTReader.cpp.
References clang::serialization::ModuleFile::CXXBaseSpecifiersOffsets, and clang::serialization::ModuleFile::LocalNumCXXBaseSpecifiers.
CXXCtorInitializer ** ASTReader::ReadCXXCtorInitializers | ( | ModuleFile & | F, |
const RecordData & | Record, | ||
unsigned & | Idx | ||
) |
Read a CXXCtorInitializer array.
Definition at line 7724 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().
uint64_t ASTReader::ReadCXXCtorInitializersRef | ( | ModuleFile & | M, |
const RecordData & | Record, | ||
unsigned & | Idx | ||
) |
Read a CXXCtorInitializers ID from the given record and return its global bit offset.
Definition at line 5916 of file ASTReader.cpp.
References clang::serialization::ModuleFile::CXXCtorInitializersOffsets, and clang::serialization::ModuleFile::LocalNumCXXCtorInitializers.
Referenced by clang::ASTDeclReader::UpdateDecl().
CXXTemporary * ASTReader::ReadCXXTemporary | ( | ModuleFile & | F, |
const RecordData & | Record, | ||
unsigned & | Idx | ||
) |
Definition at line 7983 of file ASTReader.cpp.
References clang::CXXTemporary::Create().
|
inline |
Reads a declaration from the given position in a record in the given module.
Definition at line 1651 of file ASTReader.h.
References GetDecl(), and ReadDeclID().
Referenced by clang::ASTDeclReader::UpdateDecl().
DeclarationName ASTReader::ReadDeclarationName | ( | ModuleFile & | F, |
const RecordData & | Record, | ||
unsigned & | Idx | ||
) |
Read a declaration name.
Definition at line 7470 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 7541 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 7509 of file ASTReader.cpp.
References 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::DeclarationName::getNameKind(), clang::SourceLocation::getRawEncoding(), GetTypeSourceInfo(), clang::DeclarationName::Identifier, clang::DeclarationNameLoc::NamedType, clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, clang::DeclarationName::ObjCZeroArgSelector, clang::DeclarationNameLoc::CXXLitOpName::OpNameLoc, ReadSourceLocation(), and clang::DeclarationNameLoc::NT::TInfo.
Referenced by ReadDeclarationNameInfo().
|
inline |
Reads a declaration from the given position in a record in the given module.
Definition at line 1661 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 6132 of file ASTReader.cpp.
Referenced by ReadDecl(), ReadDeclAs(), and ReadUnresolvedSet().
|
overridevirtual |
Read the set of macros defined by this external macro source.
Implements clang::ExternalPreprocessorSource.
Definition at line 1594 of file ASTReader.cpp.
References clang::serialized_diags::Error, clang::serialization::PP_MACRO_FUNCTION_LIKE, clang::serialization::PP_MACRO_OBJECT_LIKE, and clang::serialization::PP_TOKEN.
|
overridevirtual |
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 7089 of file ASTReader.cpp.
References GetDecl().
Expr * ASTReader::ReadExpr | ( | ModuleFile & | F | ) |
Reads an expression.
Definition at line 2287 of file ASTReaderStmt.cpp.
Referenced by ReadCXXCtorInitializers(), ReadTemplateArgument(), and clang::TypeLocReader::VisitArrayTypeLoc().
|
overridevirtual |
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 7100 of file ASTReader.cpp.
References GetDecl().
|
overridevirtual |
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 7032 of file ASTReader.cpp.
References GetDecl().
|
overridevirtual |
Read the set of late parsed template functions for this source.
The external source should insert its own late parsed template functions into the map. Note that this routine may be invoked multiple times; the external source should take care not to introduce the same map entries repeatedly.
Reimplemented from clang::ExternalSemaSource.
Definition at line 7184 of file ASTReader.cpp.
References clang::LateParsedTemplate::D, GetDecl(), getOwningModuleFile(), and ReadToken().
MacroInfo * ASTReader::ReadMacroRecord | ( | ModuleFile & | F, |
uint64_t | Offset | ||
) |
Reads the macro record located at the given offset.
Definition at line 1357 of file ASTReader.cpp.
References clang::MacroInfo::AddTokenToBody(), clang::serialized_diags::Error, clang::serialization::ModuleFile::MacroCursor, NextIndex, clang::serialization::PP_MACRO_DIRECTIVE_HISTORY, clang::serialization::PP_MACRO_FUNCTION_LIKE, clang::serialization::PP_MACRO_OBJECT_LIKE, clang::serialization::PP_MODULE_MACRO, clang::serialization::PP_TOKEN, clang::MacroInfo::setArgumentList(), clang::MacroInfo::setDefinitionEndLoc(), clang::MacroInfo::setHasCommaPasting(), clang::MacroInfo::setIsC99Varargs(), clang::MacroInfo::setIsFunctionLike(), clang::MacroInfo::setIsGNUVarargs(), clang::MacroInfo::setIsUsed(), and clang::MacroInfo::setUsedForHeaderGuard().
Referenced by getMacro().
|
overridevirtual |
Load the contents of the global method pool for a given selector.
Reimplemented from clang::ExternalSemaSource.
Definition at line 6996 of file ASTReader.cpp.
References addMethodsToPool(), clang::serialization::ReadMethodPoolVisitor::factoryHasMoreThanOneDecl(), clang::serialization::ReadMethodPoolVisitor::getFactoryBits(), clang::serialization::ReadMethodPoolVisitor::getFactoryMethods(), clang::ExternalASTSource::getGeneration(), clang::serialization::ReadMethodPoolVisitor::getInstanceBits(), clang::serialization::ReadMethodPoolVisitor::getInstanceMethods(), getSema(), clang::serialization::ReadMethodPoolVisitor::instanceHasMoreThanOneDecl(), clang::Sema::MethodPool, S, and clang::serialization::ModuleManager::visit().
Referenced by LoadSelector().
|
overridevirtual |
Reimplemented from clang::ExternalSemaSource.
Definition at line 7053 of file ASTReader.cpp.
References AttributeLangSupport::C, clang::LangAS::Count, GetDecl(), and clang::SourceLocation::getFromRawEncoding().
NestedNameSpecifier * ASTReader::ReadNestedNameSpecifier | ( | ModuleFile & | F, |
const RecordData & | Record, | ||
unsigned & | Idx | ||
) |
Definition at line 7809 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::Super, clang::NestedNameSpecifier::SuperSpecifier(), clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
Referenced by ReadTemplateName().
NestedNameSpecifierLoc ASTReader::ReadNestedNameSpecifierLoc | ( | ModuleFile & | F, |
const RecordData & | Record, | ||
unsigned & | Idx | ||
) |
Definition at line 7864 of file ASTReader.cpp.
References Builder, 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::NestedNameSpecifierLocBuilder::MakeSuper(), clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, ReadSourceLocation(), ReadSourceRange(), clang::NestedNameSpecifier::Super, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
Referenced by ReadQualifierInfo().
std::string ASTReader::ReadPath | ( | ModuleFile & | F, |
const RecordData & | Record, | ||
unsigned & | Idx | ||
) |
Definition at line 7964 of file ASTReader.cpp.
References ReadString(), and ResolveImportedPath().
|
overridevirtual |
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 7172 of file ASTReader.cpp.
References GetDecl(), and clang::SourceLocation::getFromRawEncoding().
void ASTReader::ReadPragmaDiagnosticMappings | ( | DiagnosticsEngine & | Diag | ) |
Definition at line 4881 of file ASTReader.cpp.
References clang::serialization::ModuleFile::PragmaDiagMappings, and SourceMgr.
|
overridevirtual |
Read a preallocated preprocessed entity from the external source.
Implements clang::ExternalPreprocessingRecordSource.
Definition at line 4616 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 7551 of file ASTReader.cpp.
References clang::QualifierInfo::NumTemplParamLists, clang::QualifierInfo::QualifierLoc, ReadNestedNameSpecifierLoc(), ReadTemplateParameterList(), and clang::QualifierInfo::TemplParamLists.
|
overridevirtual |
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 7122 of file ASTReader.cpp.
References DecodeSelector(), and clang::SourceLocation::getFromRawEncoding().
|
inline |
Definition at line 1890 of file ASTReader.h.
References getLocalSelector().
Referenced by ReadDeclarationName().
|
overridevirtual |
Read the source location entry with index ID.
Implements clang::ExternalSLocEntrySource.
Definition at line 1159 of file ASTReader.cpp.
References clang::SrcMgr::C_User, clang::SourceManager::createExpansionLoc(), clang::SourceManager::createFileID(), clang::serialization::ModuleFile::FileSortedDecls, clang::serialization::InputFile::getFile(), clang::SrcMgr::SLocEntry::getFile(), clang::FileEntry::getName(), clang::SourceManager::getSLocEntry(), clang::SourceLocation::isInvalid(), clang::serialization::InputFile::isOverridden(), clang::serialization::ModuleFile::Kind, clang::serialization::MK_ExplicitModule, clang::serialization::MK_ImplicitModule, clang::serialization::MK_MainFile, clang::SourceManager::overrideFileContents(), clang::SrcMgr::FileInfo::setHasLineDirectives(), clang::serialization::ModuleFile::SLocEntryBaseID, clang::serialization::ModuleFile::SLocEntryBaseOffset, clang::serialization::ModuleFile::SLocEntryCursor, clang::serialization::ModuleFile::SLocEntryOffsets, clang::serialization::SM_SLOC_BUFFER_BLOB, clang::serialization::SM_SLOC_BUFFER_ENTRY, clang::serialization::SM_SLOC_EXPANSION_ENTRY, clang::serialization::SM_SLOC_FILE_ENTRY, and SourceMgr.
|
inline |
Read a source location from raw form.
Definition at line 1960 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().
|
inline |
Read a source location.
Definition at line 1969 of file ASTReader.h.
References ReadSourceLocation().
SourceRange ASTReader::ReadSourceRange | ( | ModuleFile & | F, |
const RecordData & | Record, | ||
unsigned & | Idx | ||
) |
Read a source range.
Definition at line 7927 of file ASTReader.cpp.
References ReadSourceLocation().
Referenced by ReadComments(), ReadCXXBaseSpecifier(), and ReadNestedNameSpecifierLoc().
Stmt * ASTReader::ReadStmt | ( | ModuleFile & | F | ) |
Reads a statement.
Definition at line 2273 of file ASTReaderStmt.cpp.
|
static |
Expr * ASTReader::ReadSubExpr | ( | ) |
Reads a sub-expression operand during statement reading.
Definition at line 2291 of file ASTReaderStmt.cpp.
|
inline |
Reads a sub-statement operand during statement reading.
Definition at line 2012 of file ASTReader.h.
TemplateArgument ASTReader::ReadTemplateArgument | ( | ModuleFile & | F, |
const RecordData & | Record, | ||
unsigned & | Idx | ||
) |
Read a template argument.
Definition at line 7623 of file ASTReader.cpp.
References clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgument::Integral, clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, ReadAPSInt(), ReadExpr(), ReadTemplateName(), readType(), clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.
Referenced by ReadTemplateArgumentList(), and ReadTemplateName().
void ASTReader::ReadTemplateArgumentList | ( | SmallVectorImpl< TemplateArgument > & | TemplArgs, |
ModuleFile & | F, | ||
const RecordData & | Record, | ||
unsigned & | Idx | ||
) |
Read a template argument array.
Definition at line 7686 of file ASTReader.cpp.
References ReadTemplateArgument().
Referenced by clang::ASTDeclReader::UpdateDecl().
TemplateArgumentLoc ASTReader::ReadTemplateArgumentLoc | ( | ModuleFile & | F, |
const RecordData & | Record, | ||
unsigned & | Idx | ||
) |
Reads a TemplateArgumentLoc.
Definition at line 5837 of file ASTReader.cpp.
References clang::TemplateArgument::Expression, clang::TemplateArgument::getAsExpr(), and clang::TemplateArgument::getKind().
TemplateName ASTReader::ReadTemplateName | ( | ModuleFile & | F, |
const RecordData & | Record, | ||
unsigned & | Idx | ||
) |
Read a template name.
Definition at line 7564 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, 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 7666 of file ASTReader.cpp.
References clang::TemplateParameterList::Create(), and ReadSourceLocation().
Referenced by ReadQualifierInfo().
|
overridevirtual |
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 7068 of file ASTReader.cpp.
References GetDecl().
Token ASTReader::ReadToken | ( | ModuleFile & | M, |
const RecordDataImpl & | Record, | ||
unsigned & | Idx | ||
) |
Reads a token out of a record.
Definition at line 1344 of file ASTReader.cpp.
References clang::Token::setFlag(), clang::Token::setIdentifierInfo(), clang::Token::setKind(), clang::Token::setLength(), clang::Token::setLocation(), and clang::Token::startToken().
Referenced by ReadLateParsedTemplates().
|
inline |
Read a type from the current position in the given record, which was read from the given AST file.
Definition at line 1585 of file ASTReader.h.
References getLocalType().
Referenced by ReadDeclarationName(), ReadNestedNameSpecifier(), ReadTemplateArgument(), and clang::ASTDeclReader::UpdateDecl().
|
overridevirtual |
Load the set of used but not defined functions or variables with internal linkage, or used but not defined internal functions.
Reimplemented from clang::ExternalSemaSource.
Definition at line 7043 of file ASTReader.cpp.
References GetDecl(), and clang::SourceLocation::getFromRawEncoding().
void ASTReader::ReadUnresolvedSet | ( | ModuleFile & | F, |
LazyASTUnresolvedSet & | Set, | ||
const RecordData & | Record, | ||
unsigned & | Idx | ||
) |
Read a UnresolvedSet structure.
Definition at line 7696 of file ASTReader.cpp.
References clang::LazyASTUnresolvedSet::addLazyDecl(), ReadDeclID(), and clang::LazyASTUnresolvedSet::reserve().
|
overridevirtual |
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 7078 of file ASTReader.cpp.
References GetDecl().
|
overridevirtual |
Read the set of potentially unused typedefs known to the source.
The external source should append its own potentially unused local typedefs 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 7110 of file ASTReader.cpp.
References GetDecl().
|
overridevirtual |
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 7160 of file ASTReader.cpp.
References clang::ExternalVTableUse::DefinitionRequired, GetDecl(), clang::SourceLocation::getFromRawEncoding(), clang::ExternalVTableUse::Location, and clang::ExternalVTableUse::Record.
|
static |
Read a version tuple.
Definition at line 7971 of file ASTReader.cpp.
|
overridevirtual |
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 7140 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 8006 of file ASTReader.cpp.
|
inline |
Reset reader for a reload try.
Definition at line 1415 of file ASTReader.h.
void ASTReader::ResolveImportedPath | ( | ModuleFile & | M, |
std::string & | Filename | ||
) |
If we are loading a relocatable PCH or module file, and the filename is not an absolute path, add the system or module root to the beginning of the file name.
Definition at line 2014 of file ASTReader.cpp.
References clang::serialization::ModuleFile::BaseDirectory.
Referenced by clang::serialization::reader::HeaderFileInfoTrait::EqualKey(), and ReadPath().
|
static |
Definition at line 2020 of file ASTReader.cpp.
void ASTReader::resolvePendingMacro | ( | IdentifierInfo * | II, |
const PendingMacroInfo & | PMInfo | ||
) |
Definition at line 1736 of file ASTReader.cpp.
References clang::serialization::ModuleFile::Kind, clang::serialization::ModuleFile::MacroCursor, clang::MacroDirective::MD_Define, clang::MacroDirective::MD_Undefine, clang::MacroDirective::MD_Visibility, clang::serialization::MK_ExplicitModule, clang::serialization::MK_ImplicitModule, clang::serialization::PP_MACRO_DIRECTIVE_HISTORY, clang::serialization::PP_MODULE_MACRO, and clang::MacroDirective::setPrevious().
void ASTReader::setDeserializationListener | ( | ASTDeserializationListener * | Listener, |
bool | TakeOwnership = false |
||
) |
Set the AST deserialization listener.
Definition at line 642 of file ASTReader.cpp.
Referenced by clang::CompilerInstance::createModuleManager().
void ASTReader::SetGloballyVisibleDecls | ( | IdentifierInfo * | II, |
const SmallVectorImpl< uint32_t > & | DeclIDs, | ||
SmallVectorImpl< Decl * > * | Decls = nullptr |
||
) |
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. |
Decls | if non-null, this vector will be populated with the set of deserialized declarations. These declarations will not be pushed into scope. |
Definition at line 7237 of file ASTReader.cpp.
References GetDecl(), and PreloadedDeclIDs.
void ASTReader::SetIdentifierInfo | ( | unsigned | ID, |
IdentifierInfo * | II | ||
) |
Definition at line 7212 of file ASTReader.cpp.
References clang::ASTDeserializationListener::IdentifierRead().
|
inline |
Set the AST callbacks listener.
Definition at line 1366 of file ASTReader.h.
Referenced by clang::ASTReader::ListenerScope::ListenerScope(), and clang::ASTReader::ListenerScope::~ListenerScope().
|
overridevirtual |
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 8409 of file ASTReader.cpp.
|
overridevirtual |
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 6610 of file ASTReader.cpp.
|
inline |
Take the AST callbacks listener.
Definition at line 1361 of file ASTReader.h.
Referenced by clang::ASTReader::ListenerScope::ListenerScope(), and clang::ASTReader::ListenerScope::~ListenerScope().
|
overridevirtual |
Update an out-of-date identifier.
Implements clang::ExternalPreprocessorSource.
Definition at line 1700 of file ASTReader.cpp.
References clang::IdentifierInfo::getName().
void ASTReader::UpdateSema | ( | ) |
Update the state of Sema after loading some additional modules.
Definition at line 6805 of file ASTReader.cpp.
|
friend |
Definition at line 338 of file ASTReader.h.
|
friend |
Definition at line 340 of file ASTReader.h.
Referenced by getIdentifiers().
|
friend |
Definition at line 339 of file ASTReader.h.
|
friend |
Definition at line 344 of file ASTReader.h.
|
friend |
Definition at line 343 of file ASTReader.h.
|
friend |
Types of AST files.
Definition at line 337 of file ASTReader.h.
|
friend |
Definition at line 341 of file ASTReader.h.
|
friend |
Definition at line 345 of file ASTReader.h.
|
friend |
Definition at line 342 of file ASTReader.h.
SmallVector<std::pair<llvm::BitstreamCursor, serialization::ModuleFile *>, 8> clang::ASTReader::CommentsCursors |
Cursors for comments blocks.
Definition at line 2083 of file ASTReader.h.
Referenced by ReadComments().
SmallVector<uint64_t, 16> clang::ASTReader::PreloadedDeclIDs |
Definition at line 2061 of file ASTReader.h.
Referenced by SetGloballyVisibleDecls().