GCC Middle and Back End API Reference
|
Macros | |
#define | INCLUDE_ALGORITHM |
#define | INCLUDE_STRING |
#define | INCLUDE_ARRAY |
#define | INCLUDE_MAP |
#define | INCLUDE_VECTOR |
Functions | |
static checksum_t | file_checksum (char const *filename) |
static bool | files_identical (char const *first_filename, char const *second_filename) |
static ltrans_file_cache::item * | read_cache_item (FILE *f, const char *dir) |
static void | write_cache_item (FILE *f, ltrans_file_cache::item *item, const char *dir) |
static int | file_exists (char const *name) |
Variables | |
static const checksum_t | NULL_CHECKSUM |
#define INCLUDE_ALGORITHM |
File caching. Copyright (C) 2023-2025 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/>.
#define INCLUDE_ARRAY |
#define INCLUDE_MAP |
#define INCLUDE_STRING |
#define INCLUDE_VECTOR |
|
static |
Computes checksum for given file, returns NULL_CHECKSUM if not possible.
References fopen, and NULL_CHECKSUM.
Referenced by ltrans_file_cache::add_to_cache().
|
static |
Returns true if file exists.
References R_OK.
|
static |
Checks identity of two files.
References fopen, free(), map, MAP_FAILED, NULL, O_RDONLY, and S_ISREG.
Referenced by ltrans_file_cache::add_to_cache().
|
static |
Reads next cache item from cachedata file. Adds `dir/` prefix to filenames.
References ltrans_file_cache::dir, and NULL.
Referenced by ltrans_file_cache::load_cache().
|
static |
Writes cache item to cachedata file. Removes `dir/` prefix from filenames.
References ltrans_file_cache::dir, fputc(), gcc_assert, ltrans_file_cache::item::input, ltrans_file_cache::item::input_checksum, ltrans_file_cache::item::last_used, and ltrans_file_cache::item::output.
Referenced by ltrans_file_cache::save_cache().
|
static |
Referenced by file_checksum().