clang  6.0.0svn
Public Member Functions | List of all members
clang::ChainedASTReaderListener Class Reference

Simple wrapper class for chaining listeners. More...

#include "clang/Serialization/ASTReader.h"

Inheritance diagram for clang::ChainedASTReaderListener:
Inheritance graph
[legend]
Collaboration diagram for clang::ChainedASTReaderListener:
Collaboration graph
[legend]

Public Member Functions

 ChainedASTReaderListener (std::unique_ptr< ASTReaderListener > First, std::unique_ptr< ASTReaderListener > Second)
 Takes ownership of First and Second. More...
 
std::unique_ptr< ASTReaderListenertakeFirst ()
 
std::unique_ptr< ASTReaderListenertakeSecond ()
 
bool ReadFullVersionInformation (StringRef FullVersion) override
 Receives the full Clang version information. More...
 
void ReadModuleName (StringRef ModuleName) override
 
void ReadModuleMapFile (StringRef ModuleMapPath) override
 
bool ReadLanguageOptions (const LangOptions &LangOpts, bool Complain, bool AllowCompatibleDifferences) override
 Receives the language options. More...
 
bool ReadTargetOptions (const TargetOptions &TargetOpts, bool Complain, bool AllowCompatibleDifferences) override
 Receives the target options. More...
 
bool ReadDiagnosticOptions (IntrusiveRefCntPtr< DiagnosticOptions > DiagOpts, bool Complain) override
 Receives the diagnostic options. More...
 
bool ReadFileSystemOptions (const FileSystemOptions &FSOpts, bool Complain) override
 Receives the file system options. More...
 
bool ReadHeaderSearchOptions (const HeaderSearchOptions &HSOpts, StringRef SpecificModuleCachePath, bool Complain) override
 Receives the header search options. More...
 
bool ReadPreprocessorOptions (const PreprocessorOptions &PPOpts, bool Complain, std::string &SuggestedPredefines) override
 Receives the preprocessor options. More...
 
void ReadCounter (const serialization::ModuleFile &M, unsigned Value) override
 Receives COUNTER value. More...
 
bool needsInputFileVisitation () override
 Returns true if this ASTReaderListener wants to receive the input files of the AST file via visitInputFile, false otherwise. More...
 
bool needsSystemInputFileVisitation () override
 Returns true if this ASTReaderListener wants to receive the system input files of the AST file via visitInputFile, false otherwise. More...
 
void visitModuleFile (StringRef Filename, serialization::ModuleKind Kind) override
 This is called for each AST file loaded. More...
 
bool visitInputFile (StringRef Filename, bool isSystem, bool isOverridden, bool isExplicitModule) override
 if needsInputFileVisitation returns true, this is called for each non-system input file of the AST File. More...
 
void readModuleFileExtension (const ModuleFileExtensionMetadata &Metadata) override
 Indicates that a particular module file extension has been read. More...
 
- Public Member Functions inherited from clang::ASTReaderListener
virtual ~ASTReaderListener ()
 
virtual bool needsImportVisitation () const
 Returns true if this ASTReaderListener wants to receive the imports of the AST file via visitImport, false otherwise. More...
 
virtual void visitImport (StringRef Filename)
 If needsImportVisitation returns true, this is called for each AST file imported by this AST file. More...
 

Detailed Description

Simple wrapper class for chaining listeners.

Definition at line 219 of file ASTReader.h.

Constructor & Destructor Documentation

◆ ChainedASTReaderListener()

clang::ChainedASTReaderListener::ChainedASTReaderListener ( std::unique_ptr< ASTReaderListener First,
std::unique_ptr< ASTReaderListener Second 
)
inline

Takes ownership of First and Second.

Definition at line 225 of file ASTReader.h.

Member Function Documentation

◆ needsInputFileVisitation()

bool ChainedASTReaderListener::needsInputFileVisitation ( )
overridevirtual

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

Reimplemented from clang::ASTReaderListener.

Definition at line 179 of file ASTReader.cpp.

◆ needsSystemInputFileVisitation()

bool ChainedASTReaderListener::needsSystemInputFileVisitation ( )
overridevirtual

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

Reimplemented from clang::ASTReaderListener.

Definition at line 183 of file ASTReader.cpp.

◆ ReadCounter()

void ChainedASTReaderListener::ReadCounter ( const serialization::ModuleFile M,
unsigned  Value 
)
overridevirtual

Receives COUNTER value.

Reimplemented from clang::ASTReaderListener.

Definition at line 174 of file ASTReader.cpp.

◆ ReadDiagnosticOptions()

bool ChainedASTReaderListener::ReadDiagnosticOptions ( IntrusiveRefCntPtr< DiagnosticOptions DiagOpts,
bool  Complain 
)
overridevirtual

Receives the diagnostic options.

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

Reimplemented from clang::ASTReaderListener.

Definition at line 145 of file ASTReader.cpp.

◆ ReadFileSystemOptions()

bool ChainedASTReaderListener::ReadFileSystemOptions ( const FileSystemOptions FSOpts,
bool  Complain 
)
overridevirtual

Receives the file system options.

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

Reimplemented from clang::ASTReaderListener.

Definition at line 152 of file ASTReader.cpp.

◆ ReadFullVersionInformation()

bool ChainedASTReaderListener::ReadFullVersionInformation ( StringRef  FullVersion)
overridevirtual

Receives the full Clang version information.

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

Reimplemented from clang::ASTReaderListener.

Definition at line 111 of file ASTReader.cpp.

◆ ReadHeaderSearchOptions()

bool ChainedASTReaderListener::ReadHeaderSearchOptions ( const HeaderSearchOptions HSOpts,
StringRef  SpecificModuleCachePath,
bool  Complain 
)
overridevirtual

Receives the header search options.

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

Reimplemented from clang::ASTReaderListener.

Definition at line 158 of file ASTReader.cpp.

◆ ReadLanguageOptions()

bool ChainedASTReaderListener::ReadLanguageOptions ( const LangOptions LangOpts,
bool  Complain,
bool  AllowCompatibleDifferences 
)
overridevirtual

Receives the language options.

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

Reimplemented from clang::ASTReaderListener.

Definition at line 127 of file ASTReader.cpp.

◆ readModuleFileExtension()

void ChainedASTReaderListener::readModuleFileExtension ( const ModuleFileExtensionMetadata Metadata)
overridevirtual

Indicates that a particular module file extension has been read.

Reimplemented from clang::ASTReaderListener.

Definition at line 209 of file ASTReader.cpp.

◆ ReadModuleMapFile()

void ChainedASTReaderListener::ReadModuleMapFile ( StringRef  ModuleMapPath)
overridevirtual

Reimplemented from clang::ASTReaderListener.

Definition at line 121 of file ASTReader.cpp.

◆ ReadModuleName()

void ChainedASTReaderListener::ReadModuleName ( StringRef  ModuleName)
overridevirtual

Reimplemented from clang::ASTReaderListener.

Definition at line 116 of file ASTReader.cpp.

◆ ReadPreprocessorOptions()

bool ChainedASTReaderListener::ReadPreprocessorOptions ( const PreprocessorOptions PPOpts,
bool  Complain,
std::string &  SuggestedPredefines 
)
overridevirtual

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 from clang::ASTReaderListener.

Definition at line 167 of file ASTReader.cpp.

◆ ReadTargetOptions()

bool ChainedASTReaderListener::ReadTargetOptions ( const TargetOptions TargetOpts,
bool  Complain,
bool  AllowCompatibleDifferences 
)
overridevirtual

Receives the target options.

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

Reimplemented from clang::ASTReaderListener.

Definition at line 136 of file ASTReader.cpp.

◆ takeFirst()

std::unique_ptr<ASTReaderListener> clang::ChainedASTReaderListener::takeFirst ( )
inline

Definition at line 229 of file ASTReader.h.

◆ takeSecond()

std::unique_ptr<ASTReaderListener> clang::ChainedASTReaderListener::takeSecond ( )
inline

Definition at line 230 of file ASTReader.h.

References Filename, and clang::SrcMgr::isSystem().

◆ visitInputFile()

bool ChainedASTReaderListener::visitInputFile ( StringRef  Filename,
bool  isSystem,
bool  isOverridden,
bool  isExplicitModule 
)
overridevirtual

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 from clang::ASTReaderListener.

Definition at line 193 of file ASTReader.cpp.

◆ visitModuleFile()

void ChainedASTReaderListener::visitModuleFile ( StringRef  Filename,
serialization::ModuleKind  Kind 
)
overridevirtual

This is called for each AST file loaded.

Reimplemented from clang::ASTReaderListener.

Definition at line 187 of file ASTReader.cpp.


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