Jlm
Public Types | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
jlm::tooling::ClangCommand Class Referencefinal

#include <Command.hpp>

Inheritance diagram for jlm::tooling::ClangCommand:
Inheritance graph
[legend]
Collaboration diagram for jlm::tooling::ClangCommand:
Collaboration graph
[legend]

Public Types

enum class  LanguageStandard {
  Unspecified , Gnu89 , Gnu99 , C89 ,
  C99 , C11 , Cpp98 , Cpp03 ,
  Cpp11 , Cpp14
}
 
enum class  ClangArgument { DisableO0OptNone }
 

Public Member Functions

 ~ClangCommand () override
 
 ClangCommand (std::vector< util::FilePath > inputFiles, util::FilePath outputFile, std::vector< std::string > libraryPaths, std::vector< std::string > libraries, bool usePthreads)
 
 ClangCommand (const util::FilePath &inputFile, util::FilePath outputFile, util::FilePath dependencyFile, std::vector< std::string > includePaths, std::vector< std::string > macroDefinitions, std::vector< std::string > warnings, std::vector< std::string > flags, bool verbose, bool rdynamic, bool suppress, bool usePthreads, bool mD, std::string mT, const LanguageStandard &languageStandard, std::vector< ClangArgument > clangArguments)
 
std::string ToString () const override
 
const util::FilePathOutputFile () const noexcept
 
const std::vector< util::FilePath > & InputFiles () const noexcept
 
- Public Member Functions inherited from jlm::tooling::Command
virtual ~Command ()
 
virtual void Run () const
 

Static Public Member Functions

static CommandGraph::NodeCreateLinkerCommand (CommandGraph &commandGraph, const std::vector< util::FilePath > &inputFiles, const util::FilePath &outputFile, const std::vector< std::string > &libraryPaths, const std::vector< std::string > &libraries, bool usePthreads)
 
static CommandGraph::NodeCreateParsingCommand (CommandGraph &commandGraph, const util::FilePath &inputFile, const util::FilePath &outputFile, const util::FilePath &dependencyFile, const std::vector< std::string > &includePaths, const std::vector< std::string > &macroDefinitions, const std::vector< std::string > &warnings, const std::vector< std::string > &flags, bool verbose, bool rdynamic, bool suppress, bool usePthread, bool mD, const std::string &mT, const LanguageStandard &languageStandard, const std::vector< ClangArgument > &clangArguments)
 

Static Private Member Functions

static std::string ToString (const LanguageStandard &languageStandard)
 
static std::string ToString (const ClangArgument &clangArgument)
 
static std::string ReplaceAll (std::string str, const std::string &from, const std::string &to)
 

Private Attributes

std::vector< util::FilePathInputFiles_
 
util::FilePath OutputFile_
 
util::FilePath DependencyFile_
 
std::vector< std::string > IncludePaths_
 
std::vector< std::string > MacroDefinitions_
 
std::vector< std::string > Warnings_
 
std::vector< std::string > Flags_
 
std::vector< std::string > Libraries_
 
std::vector< std::string > LibraryPaths_
 
bool UsePthreads_
 
bool Verbose_
 
bool Rdynamic_
 
bool Suppress_
 
bool Md_
 
std::string Mt_
 
LanguageStandard LanguageStandard_
 
std::vector< ClangArgumentClangArguments_
 
bool LinkerCommand_
 

Detailed Description

The ClangCommand class represents the clang command line tool.

Definition at line 86 of file Command.hpp.

Member Enumeration Documentation

◆ ClangArgument

Enumerator
DisableO0OptNone 

Definition at line 103 of file Command.hpp.

◆ LanguageStandard

Enumerator
Unspecified 
Gnu89 
Gnu99 
C89 
C99 
C11 
Cpp98 
Cpp03 
Cpp11 
Cpp14 

Definition at line 89 of file Command.hpp.

Constructor & Destructor Documentation

◆ ~ClangCommand()

jlm::tooling::ClangCommand::~ClangCommand ( )
overridedefault

◆ ClangCommand() [1/2]

jlm::tooling::ClangCommand::ClangCommand ( std::vector< util::FilePath inputFiles,
util::FilePath  outputFile,
std::vector< std::string >  libraryPaths,
std::vector< std::string >  libraries,
bool  usePthreads 
)
inline

Definition at line 110 of file Command.hpp.

◆ ClangCommand() [2/2]

jlm::tooling::ClangCommand::ClangCommand ( const util::FilePath inputFile,
util::FilePath  outputFile,
util::FilePath  dependencyFile,
std::vector< std::string >  includePaths,
std::vector< std::string >  macroDefinitions,
std::vector< std::string >  warnings,
std::vector< std::string >  flags,
bool  verbose,
bool  rdynamic,
bool  suppress,
bool  usePthreads,
bool  mD,
std::string  mT,
const LanguageStandard languageStandard,
std::vector< ClangArgument clangArguments 
)
inline

Definition at line 130 of file Command.hpp.

Member Function Documentation

◆ CreateLinkerCommand()

static CommandGraph::Node& jlm::tooling::ClangCommand::CreateLinkerCommand ( CommandGraph commandGraph,
const std::vector< util::FilePath > &  inputFiles,
const util::FilePath outputFile,
const std::vector< std::string > &  libraryPaths,
const std::vector< std::string > &  libraries,
bool  usePthreads 
)
inlinestatic

Definition at line 180 of file Command.hpp.

◆ CreateParsingCommand()

static CommandGraph::Node& jlm::tooling::ClangCommand::CreateParsingCommand ( CommandGraph commandGraph,
const util::FilePath inputFile,
const util::FilePath outputFile,
const util::FilePath dependencyFile,
const std::vector< std::string > &  includePaths,
const std::vector< std::string > &  macroDefinitions,
const std::vector< std::string > &  warnings,
const std::vector< std::string > &  flags,
bool  verbose,
bool  rdynamic,
bool  suppress,
bool  usePthread,
bool  mD,
const std::string &  mT,
const LanguageStandard languageStandard,
const std::vector< ClangArgument > &  clangArguments 
)
inlinestatic

Definition at line 194 of file Command.hpp.

◆ InputFiles()

const std::vector<util::FilePath>& jlm::tooling::ClangCommand::InputFiles ( ) const
inlinenoexcept

Definition at line 174 of file Command.hpp.

◆ OutputFile()

const util::FilePath& jlm::tooling::ClangCommand::OutputFile ( ) const
inlinenoexcept

Definition at line 168 of file Command.hpp.

◆ ReplaceAll()

std::string jlm::tooling::ClangCommand::ReplaceAll ( std::string  str,
const std::string &  from,
const std::string &  to 
)
staticprivate

Definition at line 233 of file Command.cpp.

◆ ToString() [1/3]

std::string jlm::tooling::ClangCommand::ToString ( ) const
overridevirtual

Implements jlm::tooling::Command.

Definition at line 101 of file Command.cpp.

◆ ToString() [2/3]

std::string jlm::tooling::ClangCommand::ToString ( const ClangArgument clangArgument)
staticprivate

Definition at line 222 of file Command.cpp.

◆ ToString() [3/3]

std::string jlm::tooling::ClangCommand::ToString ( const LanguageStandard languageStandard)
staticprivate

Definition at line 203 of file Command.cpp.

Member Data Documentation

◆ ClangArguments_

std::vector<ClangArgument> jlm::tooling::ClangCommand::ClangArguments_
private

Definition at line 260 of file Command.hpp.

◆ DependencyFile_

util::FilePath jlm::tooling::ClangCommand::DependencyFile_
private

Definition at line 243 of file Command.hpp.

◆ Flags_

std::vector<std::string> jlm::tooling::ClangCommand::Flags_
private

Definition at line 248 of file Command.hpp.

◆ IncludePaths_

std::vector<std::string> jlm::tooling::ClangCommand::IncludePaths_
private

Definition at line 245 of file Command.hpp.

◆ InputFiles_

std::vector<util::FilePath> jlm::tooling::ClangCommand::InputFiles_
private

Definition at line 241 of file Command.hpp.

◆ LanguageStandard_

LanguageStandard jlm::tooling::ClangCommand::LanguageStandard_
private

Definition at line 259 of file Command.hpp.

◆ Libraries_

std::vector<std::string> jlm::tooling::ClangCommand::Libraries_
private

Definition at line 249 of file Command.hpp.

◆ LibraryPaths_

std::vector<std::string> jlm::tooling::ClangCommand::LibraryPaths_
private

Definition at line 250 of file Command.hpp.

◆ LinkerCommand_

bool jlm::tooling::ClangCommand::LinkerCommand_
private

Definition at line 262 of file Command.hpp.

◆ MacroDefinitions_

std::vector<std::string> jlm::tooling::ClangCommand::MacroDefinitions_
private

Definition at line 246 of file Command.hpp.

◆ Md_

bool jlm::tooling::ClangCommand::Md_
private

Definition at line 256 of file Command.hpp.

◆ Mt_

std::string jlm::tooling::ClangCommand::Mt_
private

Definition at line 257 of file Command.hpp.

◆ OutputFile_

util::FilePath jlm::tooling::ClangCommand::OutputFile_
private

Definition at line 242 of file Command.hpp.

◆ Rdynamic_

bool jlm::tooling::ClangCommand::Rdynamic_
private

Definition at line 254 of file Command.hpp.

◆ Suppress_

bool jlm::tooling::ClangCommand::Suppress_
private

Definition at line 255 of file Command.hpp.

◆ UsePthreads_

bool jlm::tooling::ClangCommand::UsePthreads_
private

Definition at line 252 of file Command.hpp.

◆ Verbose_

bool jlm::tooling::ClangCommand::Verbose_
private

Definition at line 253 of file Command.hpp.

◆ Warnings_

std::vector<std::string> jlm::tooling::ClangCommand::Warnings_
private

Definition at line 247 of file Command.hpp.


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