PIPS
|
Go to the source code of this file.
Functions | |
bool | some_main_entity_p (void) |
returns whether there is a main in the database More... | |
string | get_main_entity_name (void) |
Return the local name of the main module if it is available, or the local name of any module by default. More... | |
string get_main_entity_name | ( | void | ) |
Return the local name of the main module if it is available, or the local name of any module by default.
Hopefully, the module names are sorted and the same module of rank 0 is always returned.
A new string is allocated.
Up to a memory leak: entity get_main_entity(void) == module_name_to_entity(get_main_entity_name())
??? some default if there is no main...
This has an impact on interprocedural analysis and especially semantics and works well if only one function is analyzed.
Definition at line 63 of file util.c.
References buffer, concatenate(), db_get_current_workspace_directory(), db_get_module_list(), gen_array_full_free(), gen_array_item(), gen_array_nitems(), MAIN_FILE_NAMES, MAXIMAL_MODULE_NAME_SIZE, pips_assert, pips_user_warning, safe_fgets(), strdup(), string_undefined, and strndup().
Referenced by generic_program_pointer_values(), print_program_precondition(), program_points_to(), program_postcondition(), and program_precondition().
bool some_main_entity_p | ( | void | ) |
returns whether there is a main in the database
util.c
Definition at line 37 of file util.c.
References concatenate(), db_get_current_workspace_directory(), free(), MAIN_FILE_NAMES, and strdup().
Referenced by ordinary_summary_precondition(), and summary_total_postcondition().