clang API Documentation

Static Public Member Functions | Protected Member Functions
clang::GeneratePCHAction Class Reference

#include <FrontendActions.h>

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

List of all members.

Static Public Member Functions

static 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 72 of file Frontend/FrontendActions.h.


Member Function Documentation

bool GeneratePCHAction::ComputeASTConsumerArguments ( CompilerInstance CI,
StringRef  InFile,
std::string &  Sysroot,
std::string &  OutputFile,
raw_ostream *&  OS 
) [static]
std::unique_ptr< ASTConsumer > GeneratePCHAction::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 79 of file Frontend/FrontendActions.cpp.

References ComputeASTConsumerArguments(), clang::CompilerInstance::getFrontendOpts(), clang::CompilerInstance::getPreprocessor(), and clang::FrontendOptions::RelocatablePCH.

TranslationUnitKind clang::GeneratePCHAction::getTranslationUnitKind ( ) [inline, override, protected, virtual]

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

Reimplemented from clang::FrontendAction.

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

References clang::TU_Prefix.

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

Does this action support use with AST files?

Reimplemented from clang::FrontendAction.

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


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