class PrintPreambleAction

Declaration

class PrintPreambleAction : public FrontendAction { /* full declaration omitted */ };

Description

Abstract base class for actions which can be performed by the frontend.

Declared at: clang/include/clang/Frontend/FrontendActions.h:265

Inherits from: FrontendAction

Member Variables

Method Overview

Inherited from FrontendAction:

Methods

std::unique_ptr<ASTConsumer> CreateASTConsumer(
    clang::CompilerInstance&,
    llvm::StringRef)

Description

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.

Declared at: clang/include/clang/Frontend/FrontendActions.h:268

Parameters

clang::CompilerInstance&
llvm::StringRef

Returns

The new AST consumer, or null on failure.

void ExecuteAction()

Description

Callback to run the program action, using the initialized compiler instance. This is guaranteed to only be called between BeginSourceFileAction() and EndSourceFileAction().

Declared at: clang/include/clang/Frontend/FrontendActions.h:267

bool usesPreprocessorOnly() const

Description

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.

Declared at: clang/include/clang/Frontend/FrontendActions.h:273