OSDN Git Service

* common.opt (flag_stack_check): New Variable entry.
[pf3gnuchains/gcc-fork.git] / gcc / ada / gcc-interface / misc.c
index 07b3acf..360ebab 100644 (file)
 /* This symbol needs to be defined for the front-end.  */
 void *callgraph_info_file = NULL;
 
-/* How much we want of our DWARF extensions.  Some of our DWARF extensions
-   are incompatible with regular GDB versions, so we must make sure to only
-   produce them on explicit request.  This is eventually reflected into the
-   use_gnu_debug_info_extensions common flag for later processing.  */
-static int gnat_dwarf_extensions = 0;
-
 /* Command-line argc and argv.  These variables are global since they are
    imported in back_end.adb.  */
 unsigned int save_argc;
@@ -83,7 +77,7 @@ extern void _ada_gnat1drv (void);
 /* The parser for the language.  For us, we process the GNAT tree.  */
 
 static void
-gnat_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
+gnat_parse_file (void)
 {
   int seh[2];
 
@@ -108,7 +102,7 @@ gnat_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
 
 static bool
 gnat_handle_option (size_t scode, const char *arg ATTRIBUTE_UNUSED, int value,
-                   int kind ATTRIBUTE_UNUSED,
+                   int kind ATTRIBUTE_UNUSED, location_t loc ATTRIBUTE_UNUSED,
                    const struct cl_option_handlers *handlers ATTRIBUTE_UNUSED)
 {
   enum opt_code code = (enum opt_code) scode;
@@ -139,10 +133,6 @@ gnat_handle_option (size_t scode, const char *arg ATTRIBUTE_UNUSED, int value,
       flag_eliminate_unused_debug_types = -value;
       break;
 
-    case OPT_gdwarfplus:
-      gnat_dwarf_extensions = 1;
-      break;
-
     case OPT_gant:
       warning (0, "%<-gnat%> misspelled as %<-gant%>");
 
@@ -231,8 +221,12 @@ gnat_init_options (unsigned int decoded_options_count,
    of the global_options structure.  */
 #undef optimize
 #undef optimize_size
+#undef flag_compare_debug
+#undef flag_stack_check
 int optimize;
 int optimize_size;
+int flag_compare_debug;
+enum stack_check_type flag_stack_check = NO_STACK_CHECK;
 
 /* Post-switch processing.  */
 
@@ -260,13 +254,10 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED)
   else
     flag_eliminate_unused_debug_types = 0;
 
-  /* Reflect the explicit request of DWARF extensions into the common
-     flag for use by later passes.  */
-  if (write_symbols == DWARF2_DEBUG)
-    use_gnu_debug_info_extensions = gnat_dwarf_extensions > 0;
-
   optimize = global_options.x_optimize;
   optimize_size = global_options.x_optimize_size;
+  flag_compare_debug = global_options.x_flag_compare_debug;
+  flag_stack_check = global_options.x_flag_stack_check;
 
   return false;
 }
@@ -619,8 +610,8 @@ gnat_get_subrange_bounds (const_tree gnu_type, tree *lowval, tree *highval)
   *highval = TYPE_MAX_VALUE (gnu_type);
 }
 
-/* GNU_TYPE is a type. Determine if it should be passed by reference by
-   default.  */
+/* GNU_TYPE is the type of a subprogram parameter.  Determine if it should be
+   passed by reference by default.  */
 
 bool
 default_pass_by_ref (tree gnu_type)
@@ -632,7 +623,7 @@ default_pass_by_ref (tree gnu_type)
      is an In Out parameter, but it's probably best to err on the side of
      passing more things by reference.  */
 
-  if (pass_by_reference (NULL, TYPE_MODE (gnu_type), gnu_type, 1))
+  if (pass_by_reference (NULL, TYPE_MODE (gnu_type), gnu_type, true))
     return true;
 
   if (targetm.calls.return_in_memory (gnu_type, NULL_TREE))
@@ -647,8 +638,8 @@ default_pass_by_ref (tree gnu_type)
   return false;
 }
 
-/* GNU_TYPE is the type of a subprogram parameter.  Determine from the type if
-   it should be passed by reference. */
+/* GNU_TYPE is the type of a subprogram parameter.  Determine if it must be
+   passed by reference.  */
 
 bool
 must_pass_by_ref (tree gnu_type)
@@ -702,11 +693,7 @@ static tree
 gnat_eh_personality (void)
 {
   if (!gnat_eh_personality_decl)
-    gnat_eh_personality_decl
-      = build_personality_function (targetm.except_unwind_info () == UI_SJLJ
-                                   ? "__gnat_eh_personality_sj"
-                                   : "__gnat_eh_personality");
-
+    gnat_eh_personality_decl = build_personality_function ("gnat");
   return gnat_eh_personality_decl;
 }