CppADCodeGen
HEAD
A C++ Algorithmic Differentiation Package with Source Code Generation
|
Public Member Functions | |
ClangCompiler (const std::string &clangPath="/usr/bin/clang") | |
ClangCompiler (const ClangCompiler &orig)=delete | |
ClangCompiler & | operator= (const ClangCompiler &rhs)=delete |
const std::string & | getVersion () |
virtual const std::set< std::string > & | getBitCodeFiles () const |
virtual void | generateLLVMBitCode (const std::map< std::string, std::string > &sources, JobTimer *timer=nullptr) |
void | buildDynamic (const std::string &library, JobTimer *timer=nullptr) override |
void | cleanup () override |
std::string | getCompilerPath () const |
void | setCompilerPath (const std::string &path) |
const std::string & | getTemporaryFolder () const override |
void | setTemporaryFolder (const std::string &tmpFolder) override |
bool | isSaveToDiskFirst () const override |
void | setSaveToDiskFirst (bool saveToDiskFirst) override |
const std::string & | getSourcesFolder () const override |
void | setSourcesFolder (const std::string &srcFolder) override |
const std::set< std::string > & | getObjectFiles () const override |
const std::set< std::string > & | getSourceFiles () const override |
const std::vector< std::string > & | getCompileFlags () const |
void | setCompileFlags (const std::vector< std::string > &compileFlags) |
void | addCompileFlag (const std::string &compileFlag) |
const std::vector< std::string > & | getLinkFlags () const |
void | setLinkFlags (const std::vector< std::string > &linkFlags) |
void | addLinkFlag (const std::string &linkFlag) |
const std::vector< std::string > & | getCompileLibFlags () const |
void | setCompileLibFlags (const std::vector< std::string > &compileLibFlags) |
void | addCompileLibFlag (const std::string &compileLibFlag) |
bool | isVerbose () const override |
void | setVerbose (bool verbose) override |
void | compileSources (const std::map< std::string, std::string > &sources, bool posIndepCode, JobTimer *timer=nullptr) override |
virtual void | compileSources (const std::map< std::string, std::string > &sources, bool posIndepCode, JobTimer *timer, const std::string &outputExtension, std::set< std::string > &outputFiles) |
Static Public Member Functions | |
static std::vector< std::string > | parseVersion (const std::string &version) |
Protected Member Functions | |
void | compileSource (const std::string &source, const std::string &output, bool posIndepCode) override |
void | compileFile (const std::string &path, const std::string &output, bool posIndepCode) override |
Clang compiler
Definition at line 28 of file clang_compiler.hpp.
|
inlineoverridevirtual |
Creates a dynamic library from a set of object files
library | the path to the dynamic library to be created |
Implements CppAD::cg::AbstractCCompiler< Base >.
Definition at line 89 of file clang_compiler.hpp.
|
inlineoverridevirtual |
Deletes the previously compiled object files and clears of files to include in a dynamic library
Reimplemented from CppAD::cg::AbstractCCompiler< Base >.
Definition at line 124 of file clang_compiler.hpp.
Referenced by CppAD::cg::LlvmModelLibraryProcessor< Base >::create(), CppAD::cg::LlvmBaseModelLibraryProcessorImpl< Base >::create(), and CppAD::cg::LlvmBaseModelLibraryProcessor< Base >::createBitCode().
|
inlineoverrideprotectedvirtual |
Compiles a single source file into an object file.
path | the path to the source file |
output | the compiled output file name (the object file path) |
Implements CppAD::cg::AbstractCCompiler< Base >.
Definition at line 179 of file clang_compiler.hpp.
|
inlineoverrideprotectedvirtual |
Compiles a single source file into an output file (e.g. object file or bit code file)
source | the content of the source file |
output | the compiled output file name (the object file path) |
Implements CppAD::cg::AbstractCCompiler< Base >.
Definition at line 161 of file clang_compiler.hpp.
|
inlineoverridevirtualinherited |
Compiles the provided C source code.
library | the path of the dynamic library to be created |
sources | maps the names to the content of the source files |
posIndepCode | whether or not to create position-independent code for dynamic linking |
Implements CppAD::cg::CCompiler< Base >.
Definition at line 146 of file abstract_c_compiler.hpp.
|
inlineoverridevirtualinherited |
Provides the path to a folder where the source files should be created when the option to save files to disk is active.
Implements CppAD::cg::CCompiler< Base >.
Definition at line 78 of file abstract_c_compiler.hpp.
|
inlineoverridevirtualinherited |
Provides the path to a temporary folder that should not exist (it will be deleted after the dynamic library is created)
Implements CppAD::cg::CCompiler< Base >.
Definition at line 62 of file abstract_c_compiler.hpp.
|
inlineoverridevirtualinherited |
Defines the path to a folder where the source files should be created when the option to save files to disk is active.
srcFolder | path to the folder. |
Implements CppAD::cg::CCompiler< Base >.
Definition at line 82 of file abstract_c_compiler.hpp.
|
inlineoverridevirtualinherited |
Defines the path to a temporary folder that should not exist (it will be deleted after the dynamic library is created)
tmpFolder | path to a temporary folder. |
Implements CppAD::cg::CCompiler< Base >.
Definition at line 66 of file abstract_c_compiler.hpp.