FLANG
Protected Member Functions | List of all members
Fortran::frontend::FrontendAction Class Referenceabstract

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

#include <flang/Frontend/FrontendAction.h>

Inheritance diagram for Fortran::frontend::FrontendAction:
Fortran::frontend::CodeGenAction Fortran::frontend::InitOnlyAction Fortran::frontend::InputOutputTestAction Fortran::frontend::PrescanAction Fortran::frontend::PrescanAndParseAction Fortran::frontend::PrescanAndSemaAction Fortran::frontend::PrescanAndSemaDebugAction Fortran::frontend::EmitAssemblyAction Fortran::frontend::EmitFIRAction Fortran::frontend::EmitHLFIRAction Fortran::frontend::EmitLLVMAction Fortran::frontend::EmitLLVMBitcodeAction Fortran::frontend::EmitObjAction Fortran::frontend::DebugDumpParsingLogAction Fortran::frontend::DebugDumpProvenanceAction Fortran::frontend::DebugMeasureParseTreeAction Fortran::frontend::PrintPreprocessedAction Fortran::frontend::DebugDumpParseTreeNoSemaAction Fortran::frontend::DebugUnparseNoSemaAction Fortran::frontend::DebugDumpPFTAction Fortran::frontend::DebugDumpParseTreeAction Fortran::frontend::DebugDumpSymbolsAction Fortran::frontend::DebugPreFIRTreeAction Fortran::frontend::DebugUnparseAction Fortran::frontend::DebugUnparseWithModulesAction Fortran::frontend::DebugUnparseWithSymbolsAction Fortran::frontend::GetDefinitionAction Fortran::frontend::GetSymbolsSourcesAction Fortran::frontend::ParseSyntaxOnlyAction Fortran::frontend::PluginParseTreeAction Fortran::frontend::DebugDumpAllAction

Public Member Functions

Compiler Instance Access
CompilerInstancegetInstance () const
 
void setInstance (CompilerInstance *value)
 
Current File Information
const FrontendInputFilegetCurrentInput () const
 
llvm::StringRef getCurrentFile () const
 
llvm::StringRef getCurrentFileOrBufferName () const
 
void setCurrentInput (const FrontendInputFile &currentIntput)
 
Public Action Interface
bool beginSourceFile (CompilerInstance &ci, const FrontendInputFile &input)
 
llvm::Error execute ()
 Run the action.
 
void endSourceFile ()
 

Protected Member Functions

bool runPrescan ()
 
bool runParse (bool emitMessages)
 
bool runSemanticChecks ()
 
bool generateRtTypeTables ()
 
bool reportFatalSemanticErrors ()
 
bool reportFatalScanningErrors ()
 
bool reportFatalParsingErrors ()
 
Implementation Action Interface
virtual void executeAction ()=0
 
virtual bool shouldEraseOutputFiles ()
 
virtual bool beginSourceFileAction ()
 

Detailed Description

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

Member Function Documentation

◆ beginSourceFile()

bool FrontendAction::beginSourceFile ( CompilerInstance ci,
const FrontendInputFile input 
)

Prepare the action for processing the input file input.

This is run after the options and frontend have been initialized, but prior to executing any per-file processing.

Parameters
ci- The compiler instance this action is being run from. The action may store and use this object.
input- The input filename and kind.
Returns
True on success; on failure the compilation of this file should

◆ beginSourceFileAction()

virtual bool Fortran::frontend::FrontendAction::beginSourceFileAction ( )
inlineprotectedvirtual

Callback at the start of processing a single input.

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

◆ endSourceFile()

void FrontendAction::endSourceFile ( )

Perform any per-file post processing, deallocate per-file objects, and run statistics and output file cleanup code.

◆ executeAction()

virtual void Fortran::frontend::FrontendAction::executeAction ( )
protectedpure virtual

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

◆ shouldEraseOutputFiles()

bool FrontendAction::shouldEraseOutputFiles ( )
protectedvirtual

Callback at the end of processing a single input, to determine if the output files should be erased or not.

By default it returns true if a compiler error occurred.


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