class ASTReaderListener
Declaration
class ASTReaderListener { /* full declaration omitted */ };
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.
Declared at: clang/include/clang/Serialization/ASTReader.h:113
Method Overview
- public virtual void ReadCounter(const serialization::ModuleFile & M, unsigned int Value)
- public virtual bool ReadDiagnosticOptions(IntrusiveRefCntPtr<clang::DiagnosticOptions> DiagOpts, bool Complain)
- public virtual bool ReadFileSystemOptions(const clang::FileSystemOptions & FSOpts, bool Complain)
- public virtual bool ReadFullVersionInformation(llvm::StringRef FullVersion)
- public virtual bool ReadHeaderSearchOptions(const clang::HeaderSearchOptions & HSOpts, llvm::StringRef SpecificModuleCachePath, bool Complain)
- public virtual bool ReadLanguageOptions(const clang::LangOptions & LangOpts, bool Complain, bool AllowCompatibleDifferences)
- public virtual void ReadModuleMapFile(llvm::StringRef ModuleMapPath)
- public virtual void ReadModuleName(llvm::StringRef ModuleName)
- public virtual bool ReadPreprocessorOptions(const clang::PreprocessorOptions & PPOpts, bool Complain, std::string & SuggestedPredefines)
- public virtual bool ReadTargetOptions(const clang::TargetOptions & TargetOpts, bool Complain, bool AllowCompatibleDifferences)
- public virtual bool needsImportVisitation() const
- public virtual bool needsInputFileVisitation()
- public virtual bool needsSystemInputFileVisitation()
- public virtual void readModuleFileExtension(const clang::ModuleFileExtensionMetadata & Metadata)
- public virtual void visitImport(llvm::StringRef ModuleName, llvm::StringRef Filename)
- public virtual bool visitInputFile(llvm::StringRef Filename, bool isSystem, bool isOverridden, bool isExplicitModule)
- public virtual void visitModuleFile(llvm::StringRef Filename, serialization::ModuleKind Kind)
- public virtual ~ASTReaderListener()
Methods
¶virtual void ReadCounter(
const serialization::ModuleFile& M,
unsigned int Value)
virtual void ReadCounter(
const serialization::ModuleFile& M,
unsigned int Value)
Description
Receives __COUNTER__ value.
Declared at: clang/include/clang/Serialization/ASTReader.h:190
Parameters
- const serialization::ModuleFile& M
- unsigned int Value
¶virtual bool ReadDiagnosticOptions(
IntrusiveRefCntPtr<clang::DiagnosticOptions>
DiagOpts,
bool Complain)
virtual bool ReadDiagnosticOptions(
IntrusiveRefCntPtr<clang::DiagnosticOptions>
DiagOpts,
bool Complain)
Description
Receives the diagnostic options.
Declared at: clang/include/clang/Serialization/ASTReader.h:151
Parameters
- IntrusiveRefCntPtr<clang::DiagnosticOptions> DiagOpts
- bool Complain
Returns
true to indicate the diagnostic options are invalid, or false otherwise.
¶virtual bool ReadFileSystemOptions(
const clang::FileSystemOptions& FSOpts,
bool Complain)
virtual bool ReadFileSystemOptions(
const clang::FileSystemOptions& FSOpts,
bool Complain)
Description
Receives the file system options.
Declared at: clang/include/clang/Serialization/ASTReader.h:160
Parameters
- const clang::FileSystemOptions& FSOpts
- bool Complain
Returns
true to indicate the file system options are invalid, or false otherwise.
¶virtual bool ReadFullVersionInformation(
llvm::StringRef FullVersion)
virtual bool ReadFullVersionInformation(
llvm::StringRef FullVersion)
Description
Receives the full Clang version information.
Declared at: clang/include/clang/Serialization/ASTReader.h:121
Parameters
- llvm::StringRef FullVersion
Returns
true to indicate that the version is invalid. Subclasses should generally defer to this implementation.
¶virtual bool ReadHeaderSearchOptions(
const clang::HeaderSearchOptions& HSOpts,
llvm::StringRef SpecificModuleCachePath,
bool Complain)
virtual bool ReadHeaderSearchOptions(
const clang::HeaderSearchOptions& HSOpts,
llvm::StringRef SpecificModuleCachePath,
bool Complain)
Description
Receives the header search options.
Declared at: clang/include/clang/Serialization/ASTReader.h:169
Parameters
- const clang::HeaderSearchOptions& HSOpts
- llvm::StringRef SpecificModuleCachePath
- bool Complain
Returns
true to indicate the header search options are invalid, or false otherwise.
¶virtual bool ReadLanguageOptions(
const clang::LangOptions& LangOpts,
bool Complain,
bool AllowCompatibleDifferences)
virtual bool ReadLanguageOptions(
const clang::LangOptions& LangOpts,
bool Complain,
bool AllowCompatibleDifferences)
Description
Receives the language options.
Declared at: clang/include/clang/Serialization/ASTReader.h:131
Parameters
- const clang::LangOptions& LangOpts
- bool Complain
- bool AllowCompatibleDifferences
Returns
true to indicate the options are invalid or false otherwise.
¶virtual void ReadModuleMapFile(
llvm::StringRef ModuleMapPath)
virtual void ReadModuleMapFile(
llvm::StringRef ModuleMapPath)
Declared at: clang/include/clang/Serialization/ASTReader.h:126
Parameters
- llvm::StringRef ModuleMapPath
¶virtual void ReadModuleName(
llvm::StringRef ModuleName)
virtual void ReadModuleName(
llvm::StringRef ModuleName)
Declared at: clang/include/clang/Serialization/ASTReader.h:125
Parameters
- llvm::StringRef ModuleName
¶virtual bool ReadPreprocessorOptions(
const clang::PreprocessorOptions& PPOpts,
bool Complain,
std::string& SuggestedPredefines)
virtual bool ReadPreprocessorOptions(
const clang::PreprocessorOptions& PPOpts,
bool Complain,
std::string& SuggestedPredefines)
Description
Receives the preprocessor options.
Declared at: clang/include/clang/Serialization/ASTReader.h:183
Parameters
- const clang::PreprocessorOptions& PPOpts
- bool Complain
- std::string& SuggestedPredefines
- Can 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.
¶virtual bool ReadTargetOptions(
const clang::TargetOptions& TargetOpts,
bool Complain,
bool AllowCompatibleDifferences)
virtual bool ReadTargetOptions(
const clang::TargetOptions& TargetOpts,
bool Complain,
bool AllowCompatibleDifferences)
Description
Receives the target options.
Declared at: clang/include/clang/Serialization/ASTReader.h:141
Parameters
- const clang::TargetOptions& TargetOpts
- bool Complain
- bool AllowCompatibleDifferences
Returns
true to indicate the target options are invalid, or false otherwise.
¶virtual bool needsImportVisitation() const
virtual bool needsImportVisitation() const
Description
Returns true if this \c ASTReaderListener wants to receive the imports of the AST file via \c visitImport, false otherwise.
Declared at: clang/include/clang/Serialization/ASTReader.h:218
¶virtual bool needsInputFileVisitation()
virtual bool needsInputFileVisitation()
Description
Returns true if this \c ASTReaderListener wants to receive the input files of the AST file via \c visitInputFile, false otherwise.
Declared at: clang/include/clang/Serialization/ASTReader.h:199
¶virtual bool needsSystemInputFileVisitation()
virtual bool needsSystemInputFileVisitation()
Description
Returns true if this \c ASTReaderListener wants to receive the system input files of the AST file via \c visitInputFile, false otherwise.
Declared at: clang/include/clang/Serialization/ASTReader.h:203
¶virtual void readModuleFileExtension(
const clang::ModuleFileExtensionMetadata&
Metadata)
virtual void readModuleFileExtension(
const clang::ModuleFileExtensionMetadata&
Metadata)
Description
Indicates that a particular module file extension has been read.
Declared at: clang/include/clang/Serialization/ASTReader.h:225
Parameters
- const clang::ModuleFileExtensionMetadata& Metadata
¶virtual void visitImport(
llvm::StringRef ModuleName,
llvm::StringRef Filename)
virtual void visitImport(
llvm::StringRef ModuleName,
llvm::StringRef Filename)
Description
If needsImportVisitation returns \c true, this is called for each AST file imported by this AST file.
Declared at: clang/include/clang/Serialization/ASTReader.h:222
Parameters
- llvm::StringRef ModuleName
- llvm::StringRef Filename
¶virtual bool visitInputFile(
llvm::StringRef Filename,
bool isSystem,
bool isOverridden,
bool isExplicitModule)
virtual bool visitInputFile(
llvm::StringRef Filename,
bool isSystem,
bool isOverridden,
bool isExplicitModule)
Description
if \c needsInputFileVisitation returns true, this is called for each non-system input file of the AST File. If\c needsSystemInputFileVisitation is true, then it is called for all system input files as well.
Declared at: clang/include/clang/Serialization/ASTReader.h:211
Parameters
- llvm::StringRef Filename
- bool isSystem
- bool isOverridden
- bool isExplicitModule
Returns
true to continue receiving the next input file, false to stop.
¶virtual void visitModuleFile(
llvm::StringRef Filename,
serialization::ModuleKind Kind)
virtual void visitModuleFile(
llvm::StringRef Filename,
serialization::ModuleKind Kind)
Description
This is called for each AST file loaded.
Declared at: clang/include/clang/Serialization/ASTReader.h:194
Parameters
- llvm::StringRef Filename
- serialization::ModuleKind Kind
¶virtual ~ASTReaderListener()
virtual ~ASTReaderListener()
Declared at: clang/include/clang/Serialization/ASTReader.h:115