clang API Documentation

Public Member Functions | Protected Member Functions
clang::GenerateModuleAction Class Reference

#include <FrontendActions.h>

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

List of all members.

Public Member Functions

 GenerateModuleAction (const FileEntry *ModuleMap=nullptr, bool IsSystem=false)
bool BeginSourceFileAction (CompilerInstance &CI, StringRef Filename) override
 Callback at the start of processing a single input.
bool ComputeASTConsumerArguments (CompilerInstance &CI, StringRef InFile, std::string &Sysroot, std::string &OutputFile, raw_ostream *&OS)
 Compute the AST consumer arguments that will be used to create the PCHGenerator instance returned by CreateASTConsumer.

Protected Member Functions

std::unique_ptr< ASTConsumerCreateASTConsumer (CompilerInstance &CI, StringRef InFile) override
 Create the AST consumer object for this action, if supported.
TranslationUnitKind getTranslationUnitKind () override
 For AST-based actions, the kind of translation unit we're handling.
bool hasASTFileSupport () const override
 Does this action support use with AST files?

Detailed Description

Definition at line 95 of file Frontend/FrontendActions.h.


Constructor & Destructor Documentation

clang::GenerateModuleAction::GenerateModuleAction ( const FileEntry ModuleMap = nullptr,
bool  IsSystem = false 
) [inline]

Definition at line 111 of file Frontend/FrontendActions.h.


Member Function Documentation

bool GenerateModuleAction::BeginSourceFileAction ( CompilerInstance CI,
StringRef  Filename 
) [override, virtual]
bool GenerateModuleAction::ComputeASTConsumerArguments ( CompilerInstance CI,
StringRef  InFile,
std::string &  Sysroot,
std::string &  OutputFile,
raw_ostream *&  OS 
)
std::unique_ptr< ASTConsumer > GenerateModuleAction::CreateASTConsumer ( CompilerInstance CI,
StringRef  InFile 
) [override, protected, virtual]

Create the AST consumer object for this action, if supported.

This routine is called as part of BeginSourceFile(), which will fail if the AST consumer cannot be created. This will not be called if the action has indicated that it only uses the preprocessor.

Parameters:
CI- The current compiler instance, provided as a convenience, see getCompilerInstance().
InFile- The current input file, provided as a convenience, see getCurrentFile().
Returns:
The new AST consumer, or null on failure.

Implements clang::FrontendAction.

Definition at line 117 of file Frontend/FrontendActions.cpp.

References ComputeASTConsumerArguments(), and clang::CompilerInstance::getPreprocessor().

For AST-based actions, the kind of translation unit we're handling.

Reimplemented from clang::FrontendAction.

Definition at line 104 of file Frontend/FrontendActions.h.

References clang::TU_Module.

bool clang::GenerateModuleAction::hasASTFileSupport ( ) const [inline, override, protected, virtual]

Does this action support use with AST files?

Reimplemented from clang::FrontendAction.

Definition at line 108 of file Frontend/FrontendActions.h.


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