clang API Documentation

Public Member Functions
clang::ASTReaderListener Class Reference

Abstract interface for callback invocations by the ASTReader. More...

#include <ASTReader.h>

Inheritance diagram for clang::ASTReaderListener:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~ASTReaderListener ()
virtual bool ReadFullVersionInformation (StringRef FullVersion)
 Receives the full Clang version information.
virtual void ReadModuleName (StringRef ModuleName)
virtual void ReadModuleMapFile (StringRef ModuleMapPath)
virtual bool ReadLanguageOptions (const LangOptions &LangOpts, bool Complain, bool AllowCompatibleDifferences)
 Receives the language options.
virtual bool ReadTargetOptions (const TargetOptions &TargetOpts, bool Complain)
 Receives the target options.
virtual bool ReadDiagnosticOptions (IntrusiveRefCntPtr< DiagnosticOptions > DiagOpts, bool Complain)
 Receives the diagnostic options.
virtual bool ReadFileSystemOptions (const FileSystemOptions &FSOpts, bool Complain)
 Receives the file system options.
virtual bool ReadHeaderSearchOptions (const HeaderSearchOptions &HSOpts, bool Complain)
 Receives the header search options.
virtual bool ReadPreprocessorOptions (const PreprocessorOptions &PPOpts, bool Complain, std::string &SuggestedPredefines)
 Receives the preprocessor options.
virtual void ReadCounter (const serialization::ModuleFile &M, unsigned Value)
 Receives __COUNTER__ value.
virtual void visitModuleFile (StringRef Filename)
 This is called for each AST file loaded.
virtual bool needsInputFileVisitation ()
 Returns true if this ASTReaderListener wants to receive the input files of the AST file via visitInputFile, false otherwise.
virtual bool needsSystemInputFileVisitation ()
 Returns true if this ASTReaderListener wants to receive the system input files of the AST file via visitInputFile, false otherwise.
virtual bool visitInputFile (StringRef Filename, bool isSystem, bool isOverridden)
 if needsInputFileVisitation returns true, this is called for each non-system input file of the AST File. If needsSystemInputFileVisitation is true, then it is called for all system input files as well.
virtual bool needsImportVisitation () const
 Returns true if this ASTReaderListener wants to receive the imports of the AST file via visitImport, false otherwise.
virtual void visitImport (StringRef Filename)
 If needsImportVisitation returns true, this is called for each AST file imported by this AST file.

Detailed Description

Abstract interface for callback invocations by the ASTReader.

While reading an AST file, the ASTReader will call the methods of the listener to pass on specific information. Some of the listener methods can return true to indicate to the ASTReader that the information (and consequently the AST file) is invalid.

Definition at line 99 of file ASTReader.h.


Constructor & Destructor Documentation

Definition at line 156 of file ASTReader.cpp.


Member Function Documentation

virtual bool clang::ASTReaderListener::needsImportVisitation ( ) const [inline, virtual]

Returns true if this ASTReaderListener wants to receive the imports of the AST file via visitImport, false otherwise.

Definition at line 200 of file ASTReader.h.

Referenced by clang::ASTReader::readASTFileControlBlock().

Returns true if this ASTReaderListener wants to receive the input files of the AST file via visitInputFile, false otherwise.

Reimplemented in clang::ChainedASTReaderListener.

Definition at line 183 of file ASTReader.h.

Referenced by clang::ASTReader::readASTFileControlBlock().

Returns true if this ASTReaderListener wants to receive the system input files of the AST file via visitInputFile, false otherwise.

Reimplemented in clang::ChainedASTReaderListener.

Definition at line 186 of file ASTReader.h.

Referenced by clang::ASTReader::readASTFileControlBlock().

virtual void clang::ASTReaderListener::ReadCounter ( const serialization::ModuleFile M,
unsigned  Value 
) [inline, virtual]

Receives __COUNTER__ value.

Reimplemented in clang::PCHValidator, and clang::ChainedASTReaderListener.

Definition at line 175 of file ASTReader.h.

virtual bool clang::ASTReaderListener::ReadDiagnosticOptions ( IntrusiveRefCntPtr< DiagnosticOptions DiagOpts,
bool  Complain 
) [inline, virtual]

Receives the diagnostic options.

Returns:
true to indicate the diagnostic options are invalid, or false otherwise.

Reimplemented in clang::PCHValidator, and clang::ChainedASTReaderListener.

Definition at line 137 of file ASTReader.h.

virtual bool clang::ASTReaderListener::ReadFileSystemOptions ( const FileSystemOptions FSOpts,
bool  Complain 
) [inline, virtual]

Receives the file system options.

Returns:
true to indicate the file system options are invalid, or false otherwise.

Reimplemented in clang::ChainedASTReaderListener.

Definition at line 146 of file ASTReader.h.

virtual bool clang::ASTReaderListener::ReadFullVersionInformation ( StringRef  FullVersion) [inline, virtual]

Receives the full Clang version information.

Returns:
true to indicate that the version is invalid. Subclasses should generally defer to this implementation.

Reimplemented in clang::ChainedASTReaderListener.

Definition at line 107 of file ASTReader.h.

References clang::getClangFullRepositoryVersion().

Referenced by clang::ASTReader::readASTFileControlBlock().

virtual bool clang::ASTReaderListener::ReadHeaderSearchOptions ( const HeaderSearchOptions HSOpts,
bool  Complain 
) [inline, virtual]

Receives the header search options.

Returns:
true to indicate the header search options are invalid, or false otherwise.

Reimplemented in clang::ChainedASTReaderListener.

Definition at line 155 of file ASTReader.h.

virtual bool clang::ASTReaderListener::ReadLanguageOptions ( const LangOptions LangOpts,
bool  Complain,
bool  AllowCompatibleDifferences 
) [inline, virtual]

Receives the language options.

Returns:
true to indicate the options are invalid or false otherwise.

Reimplemented in clang::PCHValidator, and clang::ChainedASTReaderListener.

Definition at line 117 of file ASTReader.h.

virtual void clang::ASTReaderListener::ReadModuleMapFile ( StringRef  ModuleMapPath) [inline, virtual]

Reimplemented in clang::ChainedASTReaderListener.

Definition at line 112 of file ASTReader.h.

Referenced by clang::ASTReader::readASTFileControlBlock().

virtual void clang::ASTReaderListener::ReadModuleName ( StringRef  ModuleName) [inline, virtual]

Reimplemented in clang::ChainedASTReaderListener.

Definition at line 111 of file ASTReader.h.

Referenced by clang::ASTReader::readASTFileControlBlock().

virtual bool clang::ASTReaderListener::ReadPreprocessorOptions ( const PreprocessorOptions PPOpts,
bool  Complain,
std::string &  SuggestedPredefines 
) [inline, virtual]

Receives the preprocessor options.

Parameters:
SuggestedPredefinesCan be filled in with the set of predefines that are suggested by the preprocessor options. Typically only used when loading a precompiled header.
Returns:
true to indicate the preprocessor options are invalid, or false otherwise.

Reimplemented in clang::PCHValidator, and clang::ChainedASTReaderListener.

Definition at line 168 of file ASTReader.h.

virtual bool clang::ASTReaderListener::ReadTargetOptions ( const TargetOptions TargetOpts,
bool  Complain 
) [inline, virtual]

Receives the target options.

Returns:
true to indicate the target options are invalid, or false otherwise.

Reimplemented in clang::PCHValidator, and clang::ChainedASTReaderListener.

Definition at line 127 of file ASTReader.h.

virtual void clang::ASTReaderListener::visitImport ( StringRef  Filename) [inline, virtual]

If needsImportVisitation returns true, this is called for each AST file imported by this AST file.

Definition at line 203 of file ASTReader.h.

Referenced by clang::ASTReader::readASTFileControlBlock().

virtual bool clang::ASTReaderListener::visitInputFile ( StringRef  Filename,
bool  isSystem,
bool  isOverridden 
) [inline, virtual]

if needsInputFileVisitation returns true, this is called for each non-system input file of the AST File. If needsSystemInputFileVisitation is true, then it is called for all system input files as well.

Returns:
true to continue receiving the next input file, false to stop.

Reimplemented in clang::ChainedASTReaderListener.

Definition at line 193 of file ASTReader.h.

Referenced by clang::ASTReader::readASTFileControlBlock().

virtual void clang::ASTReaderListener::visitModuleFile ( StringRef  Filename) [inline, virtual]

This is called for each AST file loaded.

Reimplemented in clang::ChainedASTReaderListener.

Definition at line 179 of file ASTReader.h.


The documentation for this class was generated from the following files: