clang API Documentation

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

#include <FrontendAction.h>

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

List of all members.

Public Member Functions

 WrapperFrontendAction (FrontendAction *WrappedAction)
virtual bool usesPreprocessorOnly () const
virtual TranslationUnitKind getTranslationUnitKind ()
 For AST-based actions, the kind of translation unit we're handling.
virtual bool hasPCHSupport () const
 hasPCHSupport - Does this action support use with PCH?
virtual bool hasASTFileSupport () const
 hasASTFileSupport - Does this action support use with AST files?
virtual bool hasIRSupport () const
 hasIRSupport - Does this action support use with IR files?
virtual bool hasCodeCompletionSupport () const

Protected Member Functions

virtual ASTConsumerCreateASTConsumer (CompilerInstance &CI, StringRef InFile)
virtual bool BeginInvocation (CompilerInstance &CI)
 Callback before starting processing a single input, giving the opportunity to modify the CompilerInvocation or do some other action before BeginSourceFileAction is called.
virtual bool BeginSourceFileAction (CompilerInstance &CI, StringRef Filename)
virtual void ExecuteAction ()
virtual void EndSourceFileAction ()

Detailed Description

WrapperFrontendAction - A frontend action which simply wraps some other runtime specified frontend action. Deriving from this class allows an action to inject custom logic around some existing action's behavior. It implements every virtual method in the FrontendAction interface by forwarding to the wrapped action.

Definition at line 250 of file FrontendAction.h.


Constructor & Destructor Documentation

WrapperFrontendAction::WrapperFrontendAction ( FrontendAction WrappedAction)

Construct a WrapperFrontendAction from an existing action, taking ownership of it.

Definition at line 466 of file FrontendAction.cpp.


Member Function Documentation

bool WrapperFrontendAction::BeginInvocation ( CompilerInstance CI) [protected, virtual]

Callback before starting processing a single input, giving the opportunity to modify the CompilerInvocation or do some other action before BeginSourceFileAction is called.

Returns:
True on success; on failure
See also:
BeginSourceFileAction() and ExecutionAction() and EndSourceFileAction() will not be called.

Reimplemented from clang::FrontendAction.

Reimplemented in clang::arcmt::ObjCMigrateAction, clang::FixItRecompile, clang::arcmt::MigrateAction, clang::arcmt::ModifyAction, and clang::arcmt::CheckAction.

Definition at line 431 of file FrontendAction.cpp.

bool WrapperFrontendAction::BeginSourceFileAction ( CompilerInstance CI,
StringRef  Filename 
) [protected, virtual]

BeginSourceFileAction - Callback at the start of processing a single input.

Returns:
True on success; on failure
See also:
ExecutionAction() and EndSourceFileAction() will not be called.

Reimplemented from clang::FrontendAction.

Definition at line 434 of file FrontendAction.cpp.

References clang::FrontendAction::getCurrentInput().

ASTConsumer * WrapperFrontendAction::CreateASTConsumer ( CompilerInstance CI,
StringRef  InFile 
) [protected, virtual]

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

This routine is called as part of

See also:
BeginSourceAction(), 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 also:
getCompilerInstance().
Parameters:
InFile- The current input file, provided as a convenience,
See also:
getCurrentFile().
Returns:
The new AST consumer, or 0 on failure.

Implements clang::FrontendAction.

Reimplemented in clang::arcmt::ObjCMigrateAction.

Definition at line 427 of file FrontendAction.cpp.

void WrapperFrontendAction::EndSourceFileAction ( ) [protected, virtual]

EndSourceFileAction - Callback at the end of processing a single input; this is guaranteed to only be called following a successful call to BeginSourceFileAction (and BeginSourceFile).

Reimplemented from clang::FrontendAction.

Definition at line 443 of file FrontendAction.cpp.

void WrapperFrontendAction::ExecuteAction ( ) [protected, virtual]

ExecuteAction - Callback to run the program action, using the initialized compiler instance.

This routine is guaranteed to only be called between

See also:
BeginSourceFileAction() and
EndSourceFileAction().

Implements clang::FrontendAction.

Definition at line 440 of file FrontendAction.cpp.

TranslationUnitKind WrapperFrontendAction::getTranslationUnitKind ( ) [virtual]

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

Reimplemented from clang::FrontendAction.

Definition at line 450 of file FrontendAction.cpp.

bool WrapperFrontendAction::hasASTFileSupport ( ) const [virtual]

hasASTFileSupport - Does this action support use with AST files?

Reimplemented from clang::FrontendAction.

Definition at line 456 of file FrontendAction.cpp.

bool WrapperFrontendAction::hasCodeCompletionSupport ( ) const [virtual]

hasCodeCompletionSupport - Does this action support use with code completion?

Reimplemented from clang::FrontendAction.

Definition at line 462 of file FrontendAction.cpp.

bool WrapperFrontendAction::hasIRSupport ( ) const [virtual]

hasIRSupport - Does this action support use with IR files?

Reimplemented from clang::FrontendAction.

Definition at line 459 of file FrontendAction.cpp.

bool WrapperFrontendAction::hasPCHSupport ( ) const [virtual]

hasPCHSupport - Does this action support use with PCH?

Reimplemented from clang::FrontendAction.

Definition at line 453 of file FrontendAction.cpp.

bool WrapperFrontendAction::usesPreprocessorOnly ( ) const [virtual]

usesPreprocessorOnly - Does this action only use the preprocessor? If so no AST context will be created and this action will be invalid with AST file inputs.

Implements clang::FrontendAction.

Definition at line 447 of file FrontendAction.cpp.


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