{
unsigned int i, last_file_ix;
FILE *resolution;
+ unsigned resolution_objects = 0;
int count = 0;
struct lto_file_decl_data **decl_data;
symtab_node *snode;
if (resolution_file_name)
{
int t;
- unsigned num_objects;
resolution = fopen (resolution_file_name, "r");
if (resolution == NULL)
fatal_error (input_location,
"could not open symbol resolution file: %m");
- t = fscanf (resolution, "%u", &num_objects);
+ t = fscanf (resolution, "%u", &resolution_objects);
gcc_assert (t == 1);
-
- /* True, since the plugin splits the archives. */
- gcc_assert (num_objects == nfiles);
}
symtab->state = LTO_STREAMING;
lto_register_canonical_types_for_odr_types ();
if (resolution_file_name)
- fclose (resolution);
+ {
+ /* True, since the plugin splits the archives. */
+ gcc_assert (resolution_objects == nfiles);
+ fclose (resolution);
+ }
/* Show the LTO report before launching LTRANS. */
if (flag_lto_report || (flag_wpa && flag_lto_report_wpa))
: O_RDONLY | O_BINARY),
0666);
if (lo->fd == -1)
- {
- error ("open %s failed: %s", fname, xstrerror (errno));
- goto fail;
- }
+ fatal_error (input_location, "open %s failed: %s", fname, xstrerror (errno));
if (!writable)
{
return &lo->base;
- fail_errmsg:
+fail_errmsg:
if (err == 0)
error ("%s: %s", fname, errmsg);
else
error ("%s: %s: %s", fname, errmsg, xstrerror (err));
- fail:
if (lo->fd != -1)
lto_obj_file_close ((lto_file *) lo);
free (lo);