|
cprover
|
#include <compile.h>
Public Types | |
| enum | { PREPROCESS_ONLY , COMPILE_ONLY , ASSEMBLE_ONLY , LINK_LIBRARY , COMPILE_LINK , COMPILE_LINK_EXECUTABLE } |
Public Member Functions | |
| compilet (cmdlinet &_cmdline, message_handlert &mh, bool Werror) | |
| constructor | |
| ~compilet () | |
| cleans up temporary files | |
| bool | add_input_file (const std::string &) |
| puts input file names into a list and does preprocessing for libraries. | |
| bool | find_library (const std::string &) |
| tries to find a library object file that matches the given library name. | |
| bool | add_files_from_archive (const std::string &file_name, bool thin_archive) |
| extracts goto binaries from AR archive and add them as input files. | |
| bool | parse (const std::string &filename, language_filest &) |
| parses a source file (low-level parsing) | |
| bool | parse_stdin (languaget &) |
| parses a source file (low-level parsing) | |
| bool | doit () |
| reads and source and object files, compiles and links them into goto program objects. | |
| std::optional< symbol_tablet > | compile () |
| Parses source files and writes object files, or keeps the symbols in the symbol_table if not compiling/assembling only. | |
| bool | link (std::optional< symbol_tablet > &&symbol_table) |
| parses object files and links them | |
| std::optional< symbol_tablet > | parse_source (const std::string &) |
Parses and type checks a source file located at file_name. | |
| bool | wrote_object_files () const |
| Has this compiler written any object files? | |
| void | cprover_macro_arities (std::map< irep_idt, std::size_t > &cprover_macros) const |
| __CPROVER_... macros written to object files and their arities | |
Static Public Member Functions | |
| static bool | write_bin_object_file (const std::string &file_name, const goto_modelt &src_goto_model, bool validate_goto_model, message_handlert &message_handler) |
Writes the goto functions of src_goto_model to a binary format object file. | |
Public Attributes | |
| bool | echo_file_name |
| bool | validate_goto_model = false |
| enum compilet:: { ... } | mode |
| std::list< std::string > | library_paths |
| std::list< std::string > | source_files |
| std::list< std::string > | object_files |
| std::list< std::string > | libraries |
| std::string | object_file_extension |
| std::string | output_file_executable |
| std::string | output_file_object |
| std::string | output_directory_object |
Protected Member Functions | |
| bool | write_bin_object_file (const std::string &file_name, const goto_modelt &src_goto_model) |
| void | add_compiler_specific_defines () const |
| void | convert_symbols (goto_modelt &) |
| bool | add_written_cprover_symbols (const symbol_tablet &symbol_table) |
Static Protected Member Functions | |
| static std::size_t | function_body_count (const goto_functionst &) |
Protected Attributes | |
| std::string | working_directory |
| std::string | override_language |
| std::list< std::string > | tmp_dirs |
| std::list< irep_idt > | seen_modes |
| messaget | log |
| cmdlinet & | cmdline |
| bool | warning_is_fatal |
| const bool | keep_file_local |
| Whether to keep implementations of file-local symbols. | |
| const std::string | file_local_mangle_suffix |
| String to include in all mangled names. | |
| std::map< irep_idt, symbolt > | written_macros |
| bool | wrote_object |
| anonymous enum |
| compilet::compilet | ( | cmdlinet & | _cmdline, |
| message_handlert & | mh, | ||
| bool | Werror ) |
constructor
Definition at line 647 of file compile.cpp.
| compilet::~compilet | ( | ) |
cleans up temporary files
Definition at line 673 of file compile.cpp.
|
protected |
Definition at line 692 of file compile.cpp.
| bool compilet::add_files_from_archive | ( | const std::string & | file_name, |
| bool | thin_archive ) |
extracts goto binaries from AR archive and add them as input files.
Definition at line 208 of file compile.cpp.
| bool compilet::add_input_file | ( | const std::string & | file_name | ) |
puts input file names into a list and does preprocessing for libraries.
Definition at line 167 of file compile.cpp.
|
protected |
Definition at line 740 of file compile.cpp.
| std::optional< symbol_tablet > compilet::compile | ( | ) |
Parses source files and writes object files, or keeps the symbols in the symbol_table if not compiling/assembling only.
Definition at line 371 of file compile.cpp.
|
protected |
Definition at line 698 of file compile.cpp.
|
inline |
| bool compilet::doit | ( | ) |
reads and source and object files, compiles and links them into goto program objects.
Definition at line 54 of file compile.cpp.
| bool compilet::find_library | ( | const std::string & | name | ) |
tries to find a library object file that matches the given library name.
Definition at line 273 of file compile.cpp.
|
staticprotected |
Definition at line 681 of file compile.cpp.
| bool compilet::link | ( | std::optional< symbol_tablet > && | symbol_table | ) |
parses object files and links them
Definition at line 317 of file compile.cpp.
| bool compilet::parse | ( | const std::string & | file_name, |
| language_filest & | language_files ) |
parses a source file (low-level parsing)
Definition at line 457 of file compile.cpp.
| std::optional< symbol_tablet > compilet::parse_source | ( | const std::string & | file_name | ) |
Parses and type checks a source file located at file_name.
Definition at line 621 of file compile.cpp.
| bool compilet::parse_stdin | ( | languaget & | language | ) |
parses a source file (low-level parsing)
| language | source language processor |
Definition at line 538 of file compile.cpp.
|
inlineprotected |
|
static |
Writes the goto functions of src_goto_model to a binary format object file.
| file_name | Target file to serialize src_goto_model to |
| src_goto_model | goto model to serialize |
| validate_goto_model | enable goto-model validation |
| message_handler | message handler |
Definition at line 574 of file compile.cpp.
|
inline |
|
protected |
|
protected |
| enum { ... } compilet::mode |