Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions gcc/jit/dummy-frontend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1035,8 +1035,6 @@ jit_end_diagnostic (diagnostic_context *context,
gcc::jit::active_playback_ctxt->add_diagnostic (context, *diagnostic);
}

static bool builtins_initialized = false;

/* Language hooks. */

static bool
Expand Down Expand Up @@ -1075,12 +1073,16 @@ jit_langhook_init (void)
eventually be controllable by a command line option. */
mpfr_set_default_prec (256);

// TODO: check if this is a good fix.
if (!builtins_initialized)
{
targetm.init_builtins ();
builtins_initialized = true;
}
// FIXME: This code doesn't work as it erases the `target_builtins` map
// without checking if it's already filled before. A better check would be
// `if target_builtins.len() == 0` (or whatever this `hash_map` type method
// name is).
// static bool builtins_initialized = false;
// if (!builtins_initialized)
// {
targetm.init_builtins ();
// builtins_initialized = true;
// }

return true;
}
Expand Down