/* LTO IL options.
- Copyright 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
Contributed by Simon Baldwin <simonb@google.com>
This file is part of GCC.
bool *first_p, const char *opt)
{
const char *p, *q = opt;
- if (!first_p)
+ if (!*first_p)
obstack_grow (ob, " ", 1);
obstack_grow (ob, "'", 1);
while ((p = strchr (q, '\'')))
{
struct cl_decoded_option *option = &save_decoded_options[i];
+ /* Skip explicitly some common options that we do not need. */
+ switch (option->opt_index)
+ {
+ case OPT_dumpbase:
+ case OPT_SPECIAL_unknown:
+ case OPT_SPECIAL_ignore:
+ case OPT_SPECIAL_program_name:
+ case OPT_SPECIAL_input_file:
+ continue;
+
+ default:
+ break;
+ }
+
/* Skip frontend and driver specific options here. */
if (!(cl_options[option->opt_index].flags & (CL_COMMON|CL_TARGET|CL_LTO)))
continue;
if (cl_options[option->opt_index].flags & (CL_DRIVER|CL_WARNING))
continue;
- /* Skip explicitly some common options that we do not need. */
- switch (option->opt_index)
- {
- case OPT_dumpbase:
- case OPT_SPECIAL_input_file:
- continue;
-
- default:
- break;
- }
-
for (j = 0; j < option->canonical_option_num_elements; ++j)
append_to_collect_gcc_options (&temporary_obstack, &first_p,
option->canonical_option[j]);