CmdArgs.push_back(types::getTypeName(Input.getType()));
}
-void Flang::AddFortranDialectOptions(const ArgList &Args,
+void Flang::addFortranDialectOptions(const ArgList &Args,
ArgStringList &CmdArgs) const {
Args.AddAllArgs(
CmdArgs, {options::OPT_ffixed_form, options::OPT_ffree_form,
options::OPT_fno_automatic});
}
-void Flang::AddPreprocessingOptions(const ArgList &Args,
+void Flang::addPreprocessingOptions(const ArgList &Args,
ArgStringList &CmdArgs) const {
Args.AddAllArgs(CmdArgs,
{options::OPT_P, options::OPT_D, options::OPT_U,
options::OPT_I, options::OPT_cpp, options::OPT_nocpp});
}
-void Flang::AddOtherOptions(const ArgList &Args, ArgStringList &CmdArgs) const {
+void Flang::forwardOptions(const ArgList &Args, ArgStringList &CmdArgs) const {
Args.AddAllArgs(CmdArgs,
{options::OPT_module_dir, options::OPT_fdebug_module_writer,
options::OPT_fintrinsic_modules_path, options::OPT_pedantic,
// Add preprocessing options like -I, -D, etc. if we are using the
// preprocessor (i.e. skip when dealing with e.g. binary files).
if (types::getPreprocessedType(InputType) != types::TY_INVALID)
- AddPreprocessingOptions(Args, CmdArgs);
+ addPreprocessingOptions(Args, CmdArgs);
- AddFortranDialectOptions(Args, CmdArgs);
+ addFortranDialectOptions(Args, CmdArgs);
// Color diagnostics are parsed by the driver directly from argv and later
// re-parsed to construct this job; claim any possible color diagnostic here
// -fPIC and related options.
AddPicOptions(Args, CmdArgs);
- // Add other compile options
- AddOtherOptions(Args, CmdArgs);
+ // Handle options which are simply forwarded to -fc1.
+ forwardOptions(Args, CmdArgs);
// Forward -Xflang arguments to -fc1
Args.AddAllArgValues(CmdArgs, options::OPT_Xflang);
///
/// \param [in] Args The list of input driver arguments
/// \param [out] CmdArgs The list of output command arguments
- void AddFortranDialectOptions(const llvm::opt::ArgList &Args,
+ void addFortranDialectOptions(const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs) const;
/// Extract preprocessing options from the driver arguments and add them to
///
/// \param [in] Args The list of input driver arguments
/// \param [out] CmdArgs The list of output command arguments
- void AddPreprocessingOptions(const llvm::opt::ArgList &Args,
+ void addPreprocessingOptions(const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs) const;
/// Extract PIC options from the driver arguments and add them to
void AddPicOptions(const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs) const;
- /// Extract other compilation options from the driver arguments and add them
- /// to the command arguments.
+ /// This method will effectively copy options from \a Args into \a CmdArgs.
///
/// \param [in] Args The list of input driver arguments
/// \param [out] CmdArgs The list of output command arguments
- void AddOtherOptions(const llvm::opt::ArgList &Args,
- llvm::opt::ArgStringList &CmdArgs) const;
+ void forwardOptions(const llvm::opt::ArgList &Args,
+ llvm::opt::ArgStringList &CmdArgs) const;
public:
Flang(const ToolChain &TC);