class ChainedASTReaderListener
Declaration
class ChainedASTReaderListener : public ASTReaderListener { /* full declaration omitted */ };
Description
Simple wrapper class for chaining listeners.
Declared at: clang/include/clang/Serialization/ASTReader.h:230
Inherits from: ASTReaderListener
Member Variables
- private std::unique_ptr<ASTReaderListener> First
- private std::unique_ptr<ASTReaderListener> Second
Method Overview
- public ChainedASTReaderListener(std::unique_ptr<ASTReaderListener> First, std::unique_ptr<ASTReaderListener> Second)
- public void ReadCounter(const serialization::ModuleFile & M, unsigned int Value)
- public bool ReadDiagnosticOptions(IntrusiveRefCntPtr<clang::DiagnosticOptions> DiagOpts, bool Complain)
- public bool ReadFileSystemOptions(const clang::FileSystemOptions & FSOpts, bool Complain)
- public bool ReadFullVersionInformation(llvm::StringRef FullVersion)
- public bool ReadHeaderSearchOptions(const clang::HeaderSearchOptions & HSOpts, llvm::StringRef SpecificModuleCachePath, bool Complain)
- public bool ReadLanguageOptions(const clang::LangOptions & LangOpts, bool Complain, bool AllowCompatibleDifferences)
- public void ReadModuleMapFile(llvm::StringRef ModuleMapPath)
- public void ReadModuleName(llvm::StringRef ModuleName)
- public bool ReadPreprocessorOptions(const clang::PreprocessorOptions & PPOpts, bool Complain, std::string & SuggestedPredefines)
- public bool ReadTargetOptions(const clang::TargetOptions & TargetOpts, bool Complain, bool AllowCompatibleDifferences)
- public bool needsInputFileVisitation()
- public bool needsSystemInputFileVisitation()
- public void readModuleFileExtension(const clang::ModuleFileExtensionMetadata & Metadata)
- public std::unique_ptr<ASTReaderListener> takeFirst()
- public std::unique_ptr<ASTReaderListener> takeSecond()
- public bool visitInputFile(llvm::StringRef Filename, bool isSystem, bool isOverridden, bool isExplicitModule)
- public void visitModuleFile(llvm::StringRef Filename, serialization::ModuleKind Kind)
Inherited from ASTReaderListener:
- public ReadCounter
- public ReadDiagnosticOptions
- public ReadFileSystemOptions
- public ReadFullVersionInformation
- public ReadHeaderSearchOptions
- public ReadLanguageOptions
- public ReadModuleMapFile
- public ReadModuleName
- public ReadPreprocessorOptions
- public ReadTargetOptions
- public needsImportVisitation
- public needsInputFileVisitation
- public needsSystemInputFileVisitation
- public readModuleFileExtension
- public visitImport
- public visitInputFile
- public visitModuleFile
Methods
¶ChainedASTReaderListener(
std::unique_ptr<ASTReaderListener> First,
std::unique_ptr<ASTReaderListener> Second)
ChainedASTReaderListener(
std::unique_ptr<ASTReaderListener> First,
std::unique_ptr<ASTReaderListener> Second)
Description
Takes ownership of \p First and \p Second.
Declared at: clang/include/clang/Serialization/ASTReader.h:236
Parameters
- std::unique_ptr<ASTReaderListener> First
- std::unique_ptr<ASTReaderListener> Second
¶void ReadCounter(
const serialization::ModuleFile& M,
unsigned int Value)
void ReadCounter(
const serialization::ModuleFile& M,
unsigned int Value)
Description
Receives __COUNTER__ value.
Declared at: clang/include/clang/Serialization/ASTReader.h:262
Parameters
- const serialization::ModuleFile& M
- unsigned int Value
¶bool ReadDiagnosticOptions(
IntrusiveRefCntPtr<clang::DiagnosticOptions>
DiagOpts,
bool Complain)
bool ReadDiagnosticOptions(
IntrusiveRefCntPtr<clang::DiagnosticOptions>
DiagOpts,
bool Complain)
Description
Receives the diagnostic options.
Declared at: clang/include/clang/Serialization/ASTReader.h:250
Parameters
- IntrusiveRefCntPtr<clang::DiagnosticOptions> DiagOpts
- bool Complain
Returns
true to indicate the diagnostic options are invalid, or false otherwise.
¶bool ReadFileSystemOptions(
const clang::FileSystemOptions& FSOpts,
bool Complain)
bool ReadFileSystemOptions(
const clang::FileSystemOptions& FSOpts,
bool Complain)
Description
Receives the file system options.
Declared at: clang/include/clang/Serialization/ASTReader.h:252
Parameters
- const clang::FileSystemOptions& FSOpts
- bool Complain
Returns
true to indicate the file system options are invalid, or false otherwise.
¶bool ReadFullVersionInformation(
llvm::StringRef FullVersion)
bool ReadFullVersionInformation(
llvm::StringRef FullVersion)
Description
Receives the full Clang version information.
Declared at: clang/include/clang/Serialization/ASTReader.h:243
Parameters
- llvm::StringRef FullVersion
Returns
true to indicate that the version is invalid. Subclasses should generally defer to this implementation.
¶bool ReadHeaderSearchOptions(
const clang::HeaderSearchOptions& HSOpts,
llvm::StringRef SpecificModuleCachePath,
bool Complain)
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:255
Parameters
- const clang::HeaderSearchOptions& HSOpts
- llvm::StringRef SpecificModuleCachePath
- bool Complain
Returns
true to indicate the header search options are invalid, or false otherwise.
¶bool ReadLanguageOptions(
const clang::LangOptions& LangOpts,
bool Complain,
bool AllowCompatibleDifferences)
bool ReadLanguageOptions(
const clang::LangOptions& LangOpts,
bool Complain,
bool AllowCompatibleDifferences)
Description
Receives the language options.
Declared at: clang/include/clang/Serialization/ASTReader.h:246
Parameters
- const clang::LangOptions& LangOpts
- bool Complain
- bool AllowCompatibleDifferences
Returns
true to indicate the options are invalid or false otherwise.
¶void ReadModuleMapFile(
llvm::StringRef ModuleMapPath)
void ReadModuleMapFile(
llvm::StringRef ModuleMapPath)
Declared at: clang/include/clang/Serialization/ASTReader.h:245
Parameters
- llvm::StringRef ModuleMapPath
¶void ReadModuleName(llvm::StringRef ModuleName)
void ReadModuleName(llvm::StringRef ModuleName)
Declared at: clang/include/clang/Serialization/ASTReader.h:244
Parameters
- llvm::StringRef ModuleName
¶bool ReadPreprocessorOptions(
const clang::PreprocessorOptions& PPOpts,
bool Complain,
std::string& SuggestedPredefines)
bool ReadPreprocessorOptions(
const clang::PreprocessorOptions& PPOpts,
bool Complain,
std::string& SuggestedPredefines)
Description
Receives the preprocessor options.
Declared at: clang/include/clang/Serialization/ASTReader.h:258
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.
¶bool ReadTargetOptions(
const clang::TargetOptions& TargetOpts,
bool Complain,
bool AllowCompatibleDifferences)
bool ReadTargetOptions(
const clang::TargetOptions& TargetOpts,
bool Complain,
bool AllowCompatibleDifferences)
Description
Receives the target options.
Declared at: clang/include/clang/Serialization/ASTReader.h:248
Parameters
- const clang::TargetOptions& TargetOpts
- bool Complain
- bool AllowCompatibleDifferences
Returns
true to indicate the target options are invalid, or false otherwise.
¶bool needsInputFileVisitation()
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:263
¶bool needsSystemInputFileVisitation()
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:264
¶void readModuleFileExtension(
const clang::ModuleFileExtensionMetadata&
Metadata)
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:269
Parameters
- const clang::ModuleFileExtensionMetadata& Metadata
¶std::unique_ptr<ASTReaderListener> takeFirst()
std::unique_ptr<ASTReaderListener> takeFirst()
Declared at: clang/include/clang/Serialization/ASTReader.h:240
¶std::unique_ptr<ASTReaderListener> takeSecond()
std::unique_ptr<ASTReaderListener> takeSecond()
Declared at: clang/include/clang/Serialization/ASTReader.h:241
¶bool visitInputFile(llvm::StringRef Filename,
bool isSystem,
bool isOverridden,
bool isExplicitModule)
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:267
Parameters
- llvm::StringRef Filename
- bool isSystem
- bool isOverridden
- bool isExplicitModule
Returns
true to continue receiving the next input file, false to stop.
¶void visitModuleFile(
llvm::StringRef Filename,
serialization::ModuleKind Kind)
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:265
Parameters
- llvm::StringRef Filename
- serialization::ModuleKind Kind