dbxout.c (dbxout_block): Update for current_function_func_begin_label a string.
authorGeoffrey Keating <geoffk@apple.com>
Fri, 10 Sep 2004 19:03:13 +0000 (19:03 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Fri, 10 Sep 2004 19:03:13 +0000 (19:03 +0000)
* dbxout.c (dbxout_block): Update for
current_function_func_begin_label a string.
* dwarf2out.c (dwarf2out_begin_prologue): Likewise.
* except.c (dw2_output_call_site_table): Likewise.
* toplev.c (current_function_func_begin_label): Likewise.
* tree.h (current_function_func_begin_label): Likewise.
* config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Likewise.

From-SVN: r87317

gcc/ChangeLog
gcc/config/rs6000/linux64.h
gcc/dbxout.c
gcc/dwarf2out.c
gcc/except.c
gcc/toplev.c
gcc/tree.h

index 172adf37d86fc857831e4163f4a94abcaa7eac73..ca41511f1c835c2d3461c5a014242d56b66baf51 100644 (file)
@@ -1,5 +1,13 @@
 2004-09-10  Geoffrey Keating  <geoffk@apple.com>
 
+       * dbxout.c (dbxout_block): Update for
+       current_function_func_begin_label a string.
+       * dwarf2out.c (dwarf2out_begin_prologue): Likewise.
+       * except.c (dw2_output_call_site_table): Likewise.
+       * toplev.c (current_function_func_begin_label): Likewise.
+       * tree.h (current_function_func_begin_label): Likewise.
+       * config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Likewise.
+
        * final.c (output_asm_insn): Use strtoul instead of atoi, save a
        loop.
 
index 410f31ee49bb5668fdc0f1c24bc083c7c11c9f2a..bdd0b98babfb41ba706d8485404256a1de18bfaf 100644 (file)
@@ -499,10 +499,9 @@ while (0)
       fprintf (FILE, "%s%d,0,0,", ASM_STABN_OP, BRAC);                 \
       assemble_name (FILE, NAME);                                      \
       putc ('-', FILE);                                                        \
-      if (current_function_func_begin_label != NULL_TREE)              \
+      if (current_function_func_begin_label != NULL)                   \
        {                                                               \
-         s = IDENTIFIER_POINTER (current_function_func_begin_label);   \
-         assemble_name (FILE, s);                                      \
+         assemble_name (FILE, current_function_func_begin_label);      \
        }                                                               \
       else                                                             \
        {                                                               \
index 110ed6b35437cb5a9e14cac8b7133d9e45a7cbb3..9527c1de26dfc4a72f61bfb639bc5a4ac98f7401 100644 (file)
@@ -3174,8 +3174,8 @@ static void
 dbxout_block (tree block, int depth, tree args)
 {
   const char *begin_label;
-  if (current_function_func_begin_label != NULL_TREE)
-    begin_label = IDENTIFIER_POINTER (current_function_func_begin_label);
+  if (current_function_func_begin_label != NULL)
+    begin_label = current_function_func_begin_label;
   else
     begin_label = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
 
index 8b60c26c17ad037545cecbd9bcbb8ce588096342..25f4b2523da01a1962f03b54f8aa803ecc3b7034 100644 (file)
@@ -2334,9 +2334,10 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED,
                          const char *file ATTRIBUTE_UNUSED)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
+  char * dup_label;
   dw_fde_ref fde;
 
-  current_function_func_begin_label = 0;
+  current_function_func_begin_label = NULL;
 
 #ifdef TARGET_UNWIND_INFO
   /* ??? current_function_func_begin_label is also used by except.c
@@ -2355,7 +2356,8 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED,
                               current_function_funcdef_no);
   ASM_OUTPUT_DEBUG_LABEL (asm_out_file, FUNC_BEGIN_LABEL,
                          current_function_funcdef_no);
-  current_function_func_begin_label = get_identifier (label);
+  dup_label = xstrdup (label);
+  current_function_func_begin_label = dup_label;
 
 #ifdef TARGET_UNWIND_INFO
   /* We can elide the fde allocation if we're not emitting debug info.  */
@@ -2379,7 +2381,7 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED,
   /* Add the new FDE at the end of the fde_table.  */
   fde = &fde_table[fde_table_in_use++];
   fde->decl = current_function_decl;
-  fde->dw_fde_begin = xstrdup (label);
+  fde->dw_fde_begin = dup_label;
   fde->dw_fde_current_label = NULL;
   fde->dw_fde_end = NULL;
   fde->dw_fde_cfi = NULL;
index b09ff8338a7888ab81d9bcfe36edcf5fdc52e036..9e3c06df18a80461b3e206cc02d5c40f2690f1d9 100644 (file)
@@ -3476,8 +3476,6 @@ sjlj_size_of_call_site_table (void)
 static void
 dw2_output_call_site_table (void)
 {
-  const char *const function_start_lab
-    = IDENTIFIER_POINTER (current_function_func_begin_label);
   int n = cfun->eh->call_site_data_used;
   int i;
 
@@ -3500,21 +3498,25 @@ dw2_output_call_site_table (void)
       /* ??? Perhaps use attr_length to choose data1 or data2 instead of
         data4 if the function is small enough.  */
 #ifdef HAVE_AS_LEB128
-      dw2_asm_output_delta_uleb128 (reg_start_lab, function_start_lab,
+      dw2_asm_output_delta_uleb128 (reg_start_lab,
+                                   current_function_func_begin_label,
                                    "region %d start", i);
       dw2_asm_output_delta_uleb128 (reg_end_lab, reg_start_lab,
                                    "length");
       if (cs->landing_pad)
-       dw2_asm_output_delta_uleb128 (landing_pad_lab, function_start_lab,
+       dw2_asm_output_delta_uleb128 (landing_pad_lab,
+                                     current_function_func_begin_label,
                                      "landing pad");
       else
        dw2_asm_output_data_uleb128 (0, "landing pad");
 #else
-      dw2_asm_output_delta (4, reg_start_lab, function_start_lab,
+      dw2_asm_output_delta (4, reg_start_lab,
+                           current_function_func_begin_label,
                            "region %d start", i);
       dw2_asm_output_delta (4, reg_end_lab, reg_start_lab, "length");
       if (cs->landing_pad)
-       dw2_asm_output_delta (4, landing_pad_lab, function_start_lab,
+       dw2_asm_output_delta (4, landing_pad_lab,
+                             current_function_func_begin_label,
                              "landing pad");
       else
        dw2_asm_output_data (4, 0, "landing pad");
index 79094e2e039f2ed69546fe490bf4c72f4d12579a..bf7ae20b0d93062f23745582b4b4a657bef3e516 100644 (file)
@@ -220,9 +220,9 @@ int optimize_size = 0;
    or 0 if between functions.  */
 tree current_function_decl;
 
-/* Set to the FUNC_BEGIN label of the current function, or NULL_TREE
+/* Set to the FUNC_BEGIN label of the current function, or NULL
    if none.  */
-tree current_function_func_begin_label;
+const char * current_function_func_begin_label;
 
 /* Temporarily suppress certain warnings.
    This is set while reading code from a system header file.  */
index 20adc7ffd4ee185de8669f7ab4d17af84d852af3..461b86769785332bc715a96c844a6ff4b01e70d9 100644 (file)
@@ -3350,7 +3350,7 @@ extern int pedantic_lvalues;
 extern GTY(()) tree current_function_decl;
 
 /* Nonzero means a FUNC_BEGIN label was emitted.  */
-extern GTY(()) tree current_function_func_begin_label;
+extern GTY(()) const char * current_function_func_begin_label;
 \f
 /* In tree.c */
 extern unsigned crc32_string (unsigned, const char *);