]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
dwarf2out.c (output_call_frame_info): Ignore fde->nothrow as an optimization when...
authorRichard Henderson <rth@redhat.com>
Wed, 2 Apr 2003 17:21:28 +0000 (09:21 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 2 Apr 2003 17:21:28 +0000 (09:21 -0800)
        * dwarf2out.c (output_call_frame_info): Ignore fde->nothrow as an
        optimization when flag_exceptions not enabled.

From-SVN: r65168

gcc/ChangeLog
gcc/dwarf2out.c

index 6c9b166e9a14aa0c7e5e984ca362e3a4275c6912..d0a6e3adce543688897dc2ac83a78b95f3cd66a6 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-02  Richard Henderson  <rth@redhat.com>
+
+        * dwarf2out.c (output_call_frame_info): Ignore fde->nothrow as an
+        optimization when flag_exceptions not enabled.
+
 2003-03-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        PR other/6955
index a597b6c8692754d8ebaf154e44b289fc4262b556..8a3f613ee803ff8483d2bf186a1c53444c4c5845 100644 (file)
@@ -1789,24 +1789,26 @@ output_call_frame_info (for_eh)
   dw_fde_ref fde;
   dw_cfi_ref cfi;
   char l1[20], l2[20], section_start_label[20];
-  int any_lsda_needed = 0;
+  bool any_lsda_needed = false;
   char augmentation[6];
   int augmentation_size;
   int fde_encoding = DW_EH_PE_absptr;
   int per_encoding = DW_EH_PE_absptr;
   int lsda_encoding = DW_EH_PE_absptr;
 
-  /* If we don't have any functions we'll want to unwind out of, don't emit any
-     EH unwind information.  */
+  /* If we don't have any functions we'll want to unwind out of, don't
+     emit any EH unwind information.  Note that if exceptions aren't
+     enabled, we won't have collected nothrow information, and if we
+     asked for asynchronous tables, we always want this info.  */
   if (for_eh)
     {
-      int any_eh_needed = flag_asynchronous_unwind_tables;
+      bool any_eh_needed = !flag_exceptions || flag_asynchronous_unwind_tables;
 
       for (i = 0; i < fde_table_in_use; i++)
        if (fde_table[i].uses_eh_lsda)
-         any_eh_needed = any_lsda_needed = 1;
+         any_eh_needed = any_lsda_needed = true;
        else if (! fde_table[i].nothrow)
-         any_eh_needed = 1;
+         any_eh_needed = true;
 
       if (! any_eh_needed)
        return;
@@ -1944,8 +1946,8 @@ output_call_frame_info (for_eh)
       fde = &fde_table[i];
 
       /* Don't emit EH unwind info for leaf functions that don't need it.  */
-      if (!flag_asynchronous_unwind_tables && for_eh && fde->nothrow
-         && !  fde->uses_eh_lsda)
+      if (for_eh && !flag_asynchronous_unwind_tables
+         && flag_exceptions && fde->nothrow && !fde->uses_eh_lsda)
        continue;
 
       ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, FDE_LABEL, for_eh + i * 2);