remove unused files
[platform/upstream/gcc48.git] / gcc / lto-opts.c
index 668a5ce..4d9cdfd 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
@@ -44,7 +44,7 @@ append_to_collect_gcc_options (struct obstack *ob,
                               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, '\'')))
@@ -93,6 +93,20 @@ lto_write_options (void)
     {
       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;
@@ -108,17 +122,6 @@ lto_write_options (void)
       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]);