Skip to content

CommandlineProcessing

Command line processing utility functions. Functions in this namespace are in the ROSE Utilities library and

Types

Name Description
ArgvStorage RAII storage for argv-style arguments.
ClangLanguageSelection Language state active at one exact driver input operand.

Enums

Name Description
ClangLanguageFamily Exact language family selected by Clang's ordered -x driver state.

Functions

Name Description
addCppSourceFileSuffix
[[visibility("default")]] void addCppSourceFileSuffix(std::string const& suffix);
Add another valid C++ source file extension without a leading dot.
addListToCommandLine
[[visibility("default")]] void addListToCommandLine( std::vector<std::string>& argv, std::string prefix, std::vector<std::string> argList);
Add the strings in argList to the command line.
clangLanguageSelectionForSource
[[visibility("default")]] ClangLanguageSelection clangLanguageSelectionForSource( std::vector<std::string> const& argv, std::string const& source);
Return the ordered -x state active at one exact source operand.
clangLanguageSelectionForSuffix
[[visibility("default")]] ClangLanguageSelection clangLanguageSelectionForSuffix(std::string const& source);
Return the exact Clang driver language selected by a supported suffix.
generateArgListFromArgcArgv
[[visibility("default")]] std::vector<std::string> generateArgListFromArgcArgv( int argc, char const const* argv[]);
Convert an argc-argv pair into a string vector.
generateSourceFilenames
[[visibility("default")]] std::vector<std::string> generateSourceFilenames(std::vector<std::string> const& argList);
Build the list of isolated file names from the command line.
generateStringFromArgList
[[visibility("default")]] std::string generateStringFromArgList(std::vector<std::string> const& argList);
Convert a vector of string to a single string.
isAssemblerFileNameSuffix
[[visibility("default")]] bool isAssemblerFileNameSuffix(std::string const& suffix);
isCFileNameSuffix
[[visibility("default")]] bool isCFileNameSuffix(std::string const& suffix);
isCoArrayFortranFileNameSuffix
[[visibility("default")]] bool isCoArrayFortranFileNameSuffix(std::string const& suffix);
isCppFileNameSuffix
[[visibility("default")]] bool isCppFileNameSuffix(std::string const& suffix);
isCudaFileNameSuffix
[[visibility("default")]] bool isCudaFileNameSuffix(std::string const& suffix);
isFortran2003FileNameSuffix
[[visibility("default")]] bool isFortran2003FileNameSuffix(std::string const& suffix);
isFortran2008FileNameSuffix
[[visibility("default")]] bool isFortran2008FileNameSuffix(std::string const& suffix);
isFortran77FileNameSuffix
[[visibility("default")]] bool isFortran77FileNameSuffix(std::string const& suffix);
isFortran90FileNameSuffix
[[visibility("default")]] bool isFortran90FileNameSuffix(std::string const& suffix);
isFortran95FileNameSuffix
[[visibility("default")]] bool isFortran95FileNameSuffix(std::string const& suffix);
isFortranFileNameSuffix
[[visibility("default")]] bool isFortranFileNameSuffix(std::string const& suffix);
isFortranFileNameSuffixRequiringCPP
[[visibility("default")]] bool isFortranFileNameSuffixRequiringCPP(std::string const& suffix);
isObjectFilename
[[visibility("default")]] bool isObjectFilename(std::string name);
isOpenCLFileNameSuffix
[[visibility("default")]] bool isOpenCLFileNameSuffix(std::string const& suffix);
isOption
[[visibility("default")]] bool isOption( std::vector<std::string>& argv, std::string optionPrefix, std::string Option, bool removeOption);
Search 'argv' for an option like optionPrefixOption.
isOptionTakingSecondParameter
[[visibility("default")]] bool isOptionTakingSecondParameter(std::string argument);
isOptionTakingThirdParameter
[[visibility("default")]] bool isOptionTakingThirdParameter(std::string argument);
isOptionWithParameter
[[visibility("default")]] bool isOptionWithParameter( std::vector<std::string>& argv, std::string optionPrefix, std::string Option, float& optionParameter, bool removeOption);
isOptionWithParameter overloads
isSourceFilename
[[visibility("default")]] bool isSourceFilename(std::string name);
removeAllFileNamesExcept
[[visibility("default")]] void removeAllFileNamesExcept( std::vector<std::string>& argv, std::vector<std::string> filenameList, std::string exceptFilename);
Remove file names specified in filenameList from argv.
removeArgs
[[visibility("default")]] void removeArgs( std::vector<std::string>& argv, std::string prefix);
Remove all options matching a specified prefix.
removeArgsWithParameters
[[visibility("default")]] void removeArgsWithParameters( std::vector<std::string>& argv, std::string prefix);
Remove all options matching a specified prefix along with their values.
sliceCommandLineForSource
[[visibility("default")]] std::vector<std::string> sliceCommandLineForSource( std::vector<std::string> const& argv, std::vector<std::string> const& sourceFiles, std::string const& source);
Build a per-translation-unit argv without changing ordered option state.
validateBackendCompileOnlyCommandLine
[[visibility("default")]] void validateBackendCompileOnlyCommandLine( std::vector<std::string> const& argList, std::string const& expectedSource);
Enforce the final per-translation-unit backend compile contract.
validateClangLanguageOptions
[[visibility("default")]] void validateClangLanguageOptions(std::vector<std::string> const& argv);
Validate every split or joined Clang -x option in argument order.

Variables

Name
extraCppSourceFileSuffixes

Created with MrDocs