clang API Documentation
Simple wrapper class for chaining listeners. More...
#include <ASTReader.h>
Public Member Functions | |
ChainedASTReaderListener (std::unique_ptr< ASTReaderListener > First, std::unique_ptr< ASTReaderListener > Second) | |
Takes ownership of First and Second . | |
std::unique_ptr < ASTReaderListener > | takeFirst () |
std::unique_ptr < ASTReaderListener > | takeSecond () |
bool | ReadFullVersionInformation (StringRef FullVersion) override |
Receives the full Clang version information. | |
void | ReadModuleName (StringRef ModuleName) override |
void | ReadModuleMapFile (StringRef ModuleMapPath) override |
bool | ReadLanguageOptions (const LangOptions &LangOpts, bool Complain, bool AllowCompatibleDifferences) override |
Receives the language options. | |
bool | ReadTargetOptions (const TargetOptions &TargetOpts, bool Complain) override |
Receives the target options. | |
bool | ReadDiagnosticOptions (IntrusiveRefCntPtr< DiagnosticOptions > DiagOpts, bool Complain) override |
Receives the diagnostic options. | |
bool | ReadFileSystemOptions (const FileSystemOptions &FSOpts, bool Complain) override |
Receives the file system options. | |
bool | ReadHeaderSearchOptions (const HeaderSearchOptions &HSOpts, bool Complain) override |
Receives the header search options. | |
bool | ReadPreprocessorOptions (const PreprocessorOptions &PPOpts, bool Complain, std::string &SuggestedPredefines) override |
Receives the preprocessor options. | |
void | ReadCounter (const serialization::ModuleFile &M, unsigned Value) override |
Receives __COUNTER__ value. | |
bool | needsInputFileVisitation () override |
Returns true if this ASTReaderListener wants to receive the input files of the AST file via visitInputFile , false otherwise. | |
bool | needsSystemInputFileVisitation () override |
Returns true if this ASTReaderListener wants to receive the system input files of the AST file via visitInputFile , false otherwise. | |
void | visitModuleFile (StringRef Filename) override |
This is called for each AST file loaded. | |
bool | visitInputFile (StringRef Filename, bool isSystem, bool isOverridden) override |
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. |
Simple wrapper class for chaining listeners.
Definition at line 207 of file ASTReader.h.
clang::ChainedASTReaderListener::ChainedASTReaderListener | ( | std::unique_ptr< ASTReaderListener > | First, |
std::unique_ptr< ASTReaderListener > | Second | ||
) | [inline] |
Takes ownership of First
and Second
.
Definition at line 213 of file ASTReader.h.
bool ChainedASTReaderListener::needsInputFileVisitation | ( | ) | [override, virtual] |
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 127 of file ASTReader.cpp.
bool ChainedASTReaderListener::needsSystemInputFileVisitation | ( | ) | [override, virtual] |
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 131 of file ASTReader.cpp.
void ChainedASTReaderListener::ReadCounter | ( | const serialization::ModuleFile & | M, |
unsigned | Value | ||
) | [override, virtual] |
Receives __COUNTER__ value.
Reimplemented from clang::ASTReaderListener.
Definition at line 122 of file ASTReader.cpp.
bool ChainedASTReaderListener::ReadDiagnosticOptions | ( | IntrusiveRefCntPtr< DiagnosticOptions > | DiagOpts, |
bool | Complain | ||
) | [override, virtual] |
Receives the diagnostic options.
Reimplemented from clang::ASTReaderListener.
Definition at line 98 of file ASTReader.cpp.
bool ChainedASTReaderListener::ReadFileSystemOptions | ( | const FileSystemOptions & | FSOpts, |
bool | Complain | ||
) | [override, virtual] |
Receives the file system options.
Reimplemented from clang::ASTReaderListener.
Definition at line 104 of file ASTReader.cpp.
bool ChainedASTReaderListener::ReadFullVersionInformation | ( | StringRef | FullVersion | ) | [override, virtual] |
Receives the full Clang version information.
Reimplemented from clang::ASTReaderListener.
Definition at line 71 of file ASTReader.cpp.
bool ChainedASTReaderListener::ReadHeaderSearchOptions | ( | const HeaderSearchOptions & | HSOpts, |
bool | Complain | ||
) | [override, virtual] |
Receives the header search options.
Reimplemented from clang::ASTReaderListener.
Definition at line 110 of file ASTReader.cpp.
bool ChainedASTReaderListener::ReadLanguageOptions | ( | const LangOptions & | LangOpts, |
bool | Complain, | ||
bool | AllowCompatibleDifferences | ||
) | [override, virtual] |
Receives the language options.
Reimplemented from clang::ASTReaderListener.
Definition at line 84 of file ASTReader.cpp.
void ChainedASTReaderListener::ReadModuleMapFile | ( | StringRef | ModuleMapPath | ) | [override, virtual] |
Reimplemented from clang::ASTReaderListener.
Definition at line 79 of file ASTReader.cpp.
void ChainedASTReaderListener::ReadModuleName | ( | StringRef | ModuleName | ) | [override, virtual] |
Reimplemented from clang::ASTReaderListener.
Definition at line 75 of file ASTReader.cpp.
bool ChainedASTReaderListener::ReadPreprocessorOptions | ( | const PreprocessorOptions & | PPOpts, |
bool | Complain, | ||
std::string & | SuggestedPredefines | ||
) | [override, virtual] |
Receives the preprocessor options.
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. |
Reimplemented from clang::ASTReaderListener.
Definition at line 115 of file ASTReader.cpp.
bool ChainedASTReaderListener::ReadTargetOptions | ( | const TargetOptions & | TargetOpts, |
bool | Complain | ||
) | [override, virtual] |
Receives the target options.
Reimplemented from clang::ASTReaderListener.
Definition at line 93 of file ASTReader.cpp.
std::unique_ptr<ASTReaderListener> clang::ChainedASTReaderListener::takeFirst | ( | ) | [inline] |
Definition at line 217 of file ASTReader.h.
std::unique_ptr<ASTReaderListener> clang::ChainedASTReaderListener::takeSecond | ( | ) | [inline] |
Definition at line 218 of file ASTReader.h.
bool ChainedASTReaderListener::visitInputFile | ( | StringRef | Filename, |
bool | isSystem, | ||
bool | isOverridden | ||
) | [override, 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.
Reimplemented from clang::ASTReaderListener.
Definition at line 139 of file ASTReader.cpp.
void ChainedASTReaderListener::visitModuleFile | ( | StringRef | Filename | ) | [override, virtual] |
This is called for each AST file loaded.
Reimplemented from clang::ASTReaderListener.
Definition at line 135 of file ASTReader.cpp.