cprover
gcc_modet Class Reference

#include <gcc_mode.h>

Inheritance diagram for gcc_modet:
[legend]
Collaboration diagram for gcc_modet:
[legend]

Public Member Functions

int doit () final
 does it. More...
 
void help_mode () final
 display command line help More...
 
 gcc_modet (goto_cc_cmdlinet &_cmdline, const std::string &_base_name, bool _produce_hybrid_binary)
 
- Public Member Functions inherited from goto_cc_modet
virtual int main (int argc, const char **argv)
 starts the compiler More...
 
virtual void help ()
 display command line help More...
 
virtual void usage_error ()
 prints a message informing the user about incorrect options More...
 
 goto_cc_modet (goto_cc_cmdlinet &, const std::string &_base_name, message_handlert &)
 constructor More...
 
 ~goto_cc_modet ()
 constructor More...
 
- Public Member Functions inherited from messaget
virtual void set_message_handler (message_handlert &_message_handler)
 
message_handlertget_message_handler ()
 
 messaget ()
 
 messaget (const messaget &other)
 
 messaget (message_handlert &_message_handler)
 
virtual ~messaget ()
 
mstreamtget_mstream (unsigned message_level)
 
mstreamterror ()
 
mstreamtwarning ()
 
mstreamtresult ()
 
mstreamtstatus ()
 
mstreamtstatistics ()
 
mstreamtprogress ()
 
mstreamtdebug ()
 

Protected Member Functions

int preprocess (const std::string &language, const std::string &src, const std::string &dest, bool act_as_bcc)
 call gcc for preprocessing More...
 
int run_gcc ()
 run gcc or clang with original command line More...
 
int gcc_hybrid_binary ()
 
int asm_output (bool act_as_bcc, const std::list< std::string > &preprocessed_source_files)
 
- Protected Member Functions inherited from goto_cc_modet
void register_languages ()
 

Static Protected Member Functions

static bool needs_preprocessing (const std::string &)
 

Protected Attributes

gcc_message_handlert gcc_message_handler
 
const bool produce_hybrid_binary
 
const bool act_as_ld
 
std::string native_tool_name
 
const std::map< std::string, std::set< std::string > > arch_map
 
- Protected Attributes inherited from goto_cc_modet
goto_cc_cmdlinetcmdline
 
const std::string base_name
 
- Protected Attributes inherited from messaget
message_handlertmessage_handler
 
mstreamt mstream
 

Additional Inherited Members

- Public Types inherited from messaget
enum  message_levelt {
  M_ERROR =1, M_WARNING =2, M_RESULT =4, M_STATUS =6,
  M_STATISTICS =8, M_PROGRESS =9, M_DEBUG =10
}
 
- Static Public Member Functions inherited from messaget
static mstreamteom (mstreamt &m)
 
static mstreamtendl (mstreamt &m)
 

Detailed Description

Definition at line 21 of file gcc_mode.h.

Constructor & Destructor Documentation

§ gcc_modet()

gcc_modet::gcc_modet ( goto_cc_cmdlinet _cmdline,
const std::string &  _base_name,
bool  _produce_hybrid_binary 
)

Definition at line 89 of file gcc_mode.cpp.

Member Function Documentation

§ asm_output()

int gcc_modet::asm_output ( bool  act_as_bcc,
const std::list< std::string > &  preprocessed_source_files 
)
protected

§ doit()

int gcc_modet::doit ( )
finalvirtual

does it.

Implements goto_cc_modet.

Definition at line 304 of file gcc_mode.cpp.

References act_as_ld, configt::ansi_c, configt::ansi_ct::APPLE, configt::ansi_ct::arch, arch_map, asm_output(), compilet::ASSEMBLE_ONLY, goto_cc_modet::base_name, CBMC_VERSION, configt::ansi_ct::char_is_unsigned, goto_cc_modet::cmdline, compilet::COMPILE_LINK, compilet::COMPILE_LINK_EXECUTABLE, compilet::COMPILE_ONLY, compiler_name(), config, configt::cpp, messaget::debug(), configt::ansi_ct::double_width, configt::ansi_ct::endianness, messaget::eom(), messaget::error(), configt::ansi_ct::GCC, gcc_hybrid_binary(), gcc_message_handler, get_base_name(), cmdlinet::get_value(), cmdlinet::get_values(), has_prefix(), has_suffix(), goto_cc_cmdlinet::have_infile_arg(), goto_cc_modet::help(), configt::ansi_ct::IS_BIG_ENDIAN, configt::ansi_ct::IS_LITTLE_ENDIAN, cmdlinet::isset(), compilet::LINK_LIBRARY, linker_name(), compilet::mode, configt::ansi_ct::mode, native_tool_name, needs_preprocessing(), goto_cc_cmdlinet::parsed_argv, preprocess(), compilet::PREPROCESS_ONLY, configt::ansi_ct::preprocessor_options, produce_hybrid_binary, run_gcc(), configt::set(), configt::set_arch(), configt::ansi_ct::set_arch_spec_arm(), configt::ansi_ct::set_arch_spec_i386(), configt::ansi_ct::set_arch_spec_x86_64(), configt::ansi_ct::set_c11(), configt::ansi_ct::set_c89(), configt::ansi_ct::set_c99(), configt::cppt::set_cpp11(), configt::cppt::set_cpp14(), message_handlert::set_verbosity(), configt::ansi_ct::short_int_width, configt::ansi_ct::single_precision_constant, configt::ansi_ct::single_width, configt::this_architecture(), configt::this_operating_system(), configt::ansi_ct::undefines, UNREACHABLE, unsafe_string2unsigned(), configt::ansi_ct::VISUAL_STUDIO, configt::ansi_ct::wchar_t_is_unsigned, and configt::ansi_ct::wchar_t_width.

§ gcc_hybrid_binary()

§ help_mode()

void gcc_modet::help_mode ( )
finalvirtual

display command line help

Implements goto_cc_modet.

Definition at line 1044 of file gcc_mode.cpp.

References act_as_ld.

§ needs_preprocessing()

bool gcc_modet::needs_preprocessing ( const std::string &  file)
staticprotected

Definition at line 289 of file gcc_mode.cpp.

References has_suffix().

Referenced by doit(), and gcc_hybrid_binary().

§ preprocess()

int gcc_modet::preprocess ( const std::string &  language,
const std::string &  src,
const std::string &  dest,
bool  act_as_bcc 
)
protected

§ run_gcc()

int gcc_modet::run_gcc ( )
protected

Member Data Documentation

§ act_as_ld

const bool gcc_modet::act_as_ld
protected

Definition at line 37 of file gcc_mode.h.

Referenced by doit(), and help_mode().

§ arch_map

const std::map<std::string, std::set<std::string> > gcc_modet::arch_map
protected

Definition at line 40 of file gcc_mode.h.

Referenced by doit().

§ gcc_message_handler

gcc_message_handlert gcc_modet::gcc_message_handler
protected

Definition at line 33 of file gcc_mode.h.

Referenced by doit().

§ native_tool_name

std::string gcc_modet::native_tool_name
protected

Definition at line 38 of file gcc_mode.h.

Referenced by asm_output(), doit(), gcc_hybrid_binary(), preprocess(), and run_gcc().

§ produce_hybrid_binary

const bool gcc_modet::produce_hybrid_binary
protected

Definition at line 35 of file gcc_mode.h.

Referenced by asm_output(), and doit().


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