FLANG
Public Member Functions | Static Public Member Functions | List of all members
Fortran::frontend::CompilerInvocation Class Reference
Inheritance diagram for Fortran::frontend::CompilerInvocation:
Fortran::frontend::CompilerInvocationBase

Public Member Functions

FrontendOptionsgetFrontendOpts ()
 
const FrontendOptionsgetFrontendOpts () const
 
Fortran::parser::OptionsgetFortranOpts ()
 
const Fortran::parser::OptionsgetFortranOpts () const
 
TargetOptionsgetTargetOpts ()
 
const TargetOptionsgetTargetOpts () const
 
CodeGenOptionsgetCodeGenOpts ()
 
const CodeGenOptionsgetCodeGenOpts () const
 
Fortran::common::LangOptionsgetLangOpts ()
 
const Fortran::common::LangOptionsgetLangOpts () const
 
Fortran::lower::LoweringOptionsgetLoweringOpts ()
 
const Fortran::lower::LoweringOptionsgetLoweringOpts () const
 
std::unique_ptr< Fortran::semantics::SemanticsContextgetSemanticsCtx (Fortran::parser::AllCookedSources &allCookedSources, const llvm::TargetMachine &)
 Creates and configures semantics context based on the compilation flags.
 
std::string & getModuleDir ()
 
const std::string & getModuleDir () const
 
std::string & getModuleFileSuffix ()
 
const std::string & getModuleFileSuffix () const
 
bool & getDebugModuleDir ()
 
const bool & getDebugModuleDir () const
 
bool & getHermeticModuleFileOutput ()
 
const bool & getHermeticModuleFileOutput () const
 
bool & getWarnAsErr ()
 
const bool & getWarnAsErr () const
 
bool & getUseAnalyzedObjectsForUnparse ()
 
const bool & getUseAnalyzedObjectsForUnparse () const
 
bool & getEnableConformanceChecks ()
 
const bool & getEnableConformanceChecks () const
 
const char * getArgv0 ()
 
bool & getEnableUsageChecks ()
 
const bool & getEnableUsageChecks () const
 
bool & getDisableWarnings ()
 
const bool & getDisableWarnings () const
 
Fortran::parser::AnalyzedObjectsAsFortrangetAsFortran ()
 
const Fortran::parser::AnalyzedObjectsAsFortrangetAsFortran () const
 
Fortran::common::IntrinsicTypeDefaultKindsgetDefaultKinds ()
 
const Fortran::common::IntrinsicTypeDefaultKindsgetDefaultKinds () const
 
bool getEnableTimers () const
 
void setEnableConformanceChecks ()
 
void setEnableUsageChecks ()
 
void setDisableWarnings ()
 
void setArgv0 (const char *dir)
 Useful setters.
 
void setModuleDir (std::string &dir)
 
void setModuleFileSuffix (const char *suffix)
 
void setDebugModuleDir (bool flag)
 
void setHermeticModuleFileOutput (bool flag)
 
void setWarnAsErr (bool flag)
 
void setUseAnalyzedObjectsForUnparse (bool flag)
 
void setDefaultFortranOpts ()
 Set the Fortran options to predefined defaults.
 
void setDefaultPredefinitions ()
 Set the default predefinitions.
 
void collectMacroDefinitions ()
 
void setFortranOpts ()
 
void setSemanticsOpts (Fortran::parser::AllCookedSources &)
 Set the Semantic Options.
 
void setLoweringOptions ()
 
- Public Member Functions inherited from Fortran::frontend::CompilerInvocationBase
 CompilerInvocationBase (const CompilerInvocationBase &x)
 
clang::DiagnosticOptions & getDiagnosticOpts ()
 
const clang::DiagnosticOptions & getDiagnosticOpts () const
 
PreprocessorOptionsgetPreprocessorOpts ()
 
const PreprocessorOptionsgetPreprocessorOpts () const
 

Static Public Member Functions

static bool createFromArgs (CompilerInvocation &res, llvm::ArrayRef< const char * > commandLineArgs, clang::DiagnosticsEngine &diags, const char *argv0=nullptr)
 

Additional Inherited Members

- Public Attributes inherited from Fortran::frontend::CompilerInvocationBase
llvm::IntrusiveRefCntPtr< clang::DiagnosticOptions > diagnosticOpts
 Options controlling the diagnostic engine.
 
std::shared_ptr< Fortran::frontend::PreprocessorOptionspreprocessorOpts
 Options for the preprocessor.
 

Member Function Documentation

◆ collectMacroDefinitions()

void CompilerInvocation::collectMacroDefinitions ( )

Collect the macro definitions from preprocessorOpts_ and prepare them for the parser (i.e. copy into parserOpts_)

◆ createFromArgs()

bool CompilerInvocation::createFromArgs ( CompilerInvocation res,
llvm::ArrayRef< const char * >  commandLineArgs,
clang::DiagnosticsEngine &  diags,
const char *  argv0 = nullptr 
)
static

Create a compiler invocation from a list of input options.

Returns
true on success.
false if an error was encountered while parsing the arguments
Parameters
[out]res- The resulting invocation.

◆ setFortranOpts()

void CompilerInvocation::setFortranOpts ( )

Set the Fortran options to user-specified values. These values are found in the preprocessor options.

◆ setLoweringOptions()

void CompilerInvocation::setLoweringOptions ( )

Set loweringOptions controlling lowering behavior based on the optimizationLevel.


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