GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "intl.h"
#include "diagnostic.h"
#include "obstack.h"
#include "opts.h"
#include "options.h"
#include "simple-object.h"
#include "lto-section-names.h"
#include "collect-utils.h"
Macros | |
#define | INCLUDE_MEMORY |
Functions | |
void | notice (const char *cmsgid,...) |
void | fatal_signal (int signum) |
void | setup_signals (void) |
int | collect_wait (const char *prog, struct pex_obj *pex) |
void | do_wait (const char *prog, struct pex_obj *pex) |
struct pex_obj * | collect_execute (const char *prog, char **argv, const char *outname, const char *errname, int flags, bool use_atfile, const char *atsuffix) |
void | fork_execute (const char *prog, char **argv, bool use_atfile, const char *atsuffix) |
void | utils_cleanup (bool from_signal) |
Variables | |
static char * | response_file |
bool | debug |
bool | verbose |
bool | save_temps |
const char * | dumppfx |
#define INCLUDE_MEMORY |
Utility functions used by tools like collect2 and lto-wrapper. Copyright (C) 2009-2024 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
struct pex_obj * collect_execute | ( | const char * | prog, |
char ** | argv, | ||
const char * | outname, | ||
const char * | errname, | ||
int | flags, | ||
bool | use_atfile, | ||
const char * | atsuffix ) |
Execute a program, and wait for the reply.
References _, debug, dumppfx, errno, fatal_error(), fopen, free(), input_location, notice(), NULL, response_file, and verbose.
Referenced by do_link(), fork_execute(), maybe_run_lto_and_relink(), and run_gcc().
int collect_wait | ( | const char * | prog, |
struct pex_obj * | pex ) |
Wait for a process to finish, and exit if a nonzero status is found.
References fatal_error(), input_location, NULL, response_file, strsignal(), WCOREDUMP, WEXITSTATUS, WIFEXITED, WIFSIGNALED, and WTERMSIG.
void do_wait | ( | const char * | prog, |
struct pex_obj * | pex ) |
References collect_wait(), fatal_error(), and input_location.
Referenced by fork_execute(), maybe_run_lto_and_relink(), run_gcc(), and scan_prog_file().
static void fatal_signal | ( | int | signum | ) |
On fatal signals, delete all the temporary files.
References kill, and utils_cleanup().
Referenced by driver::global_initializations(), and setup_signals().
void fork_execute | ( | const char * | prog, |
char ** | argv, | ||
bool | use_atfile, | ||
const char * | atsuffix ) |
References collect_execute(), do_wait(), and NULL.
Referenced by compile_offload_image(), main(), maybe_run_lto_and_relink(), and run_gcc().
void notice | ( | const char * | cmsgid, |
... ) |
Notify user of a non-error.
References _, ap, and vfprintf().
Referenced by collect_execute(), main(), maybe_unlink(), and write_c_file_stat().
void setup_signals | ( | void | ) |
Setup the signal handlers for the utils.
References fatal_signal().
void utils_cleanup | ( | bool | from_signal | ) |
Delete tempfiles.
References tool_cleanup().
Referenced by fatal_signal(), and lto_wrapper_cleanup().
bool debug |
Referenced by attempt_coalesce(), coalesce_partitions(), collect_execute(), dce_process_block(), dead_debug_add(), dead_debug_global_init(), dead_debug_insert_temp(), dead_debug_local_finish(), dead_debug_local_init(), dead_debug_promote_uses(), dead_debug_reset_uses(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug(), debug_body(), debug_head(), debug_rli(), debug_verbose(), df_create_unused_note(), df_note_bb_compute(), df_set_unused_notes_for_mw(), driver::driver(), bitmap_head::dump(), get_edit_distance(), env_manager::init(), main(), maybe_default_option(), maybe_default_options(), move_debug_stmts_from_forwarder(), move_insn_for_shrink_wrap(), prepare_shrink_wrap(), scan_prog_file(), word_dce_process_block(), and write_c_file_stat().
const char* dumppfx |
Referenced by collect_execute(), compile_offload_image(), find_crtoffloadtable(), main(), and run_gcc().
|
static |
Referenced by collect_execute(), and collect_wait().
bool verbose |
Referenced by collect_execute(), compile_offload_image(), gori_map::dump(), dump_possible_polymorphic_call_targets(), dump_possible_polymorphic_call_targets(), dump_targets(), dump_value_slim(), flow_loop_dump(), flow_loops_dump(), lra(), main(), maybe_unlink(), maybe_unlink(), merge_include_chains(), print_exp(), print_insn(), print_pattern(), print_value(), register_include_chains(), remove_duplicates(), run_gcc(), scan_prog_file(), and tool_cleanup().