[Janitor] Unused macros in dwarfout.c

Andreas Jaeger aj@suse.de
Sun Jun 1 08:14:00 GMT 2003


This patch removes unused macros in dwarfout.c.

Ok to commit if bootstrap passes on i686-linux-gnu?

Andreas

2003-06-01  Andreas Jaeger  <aj@suse.de>

	* dwarfout.c: Remove USE_ORDERING_ATTRIBUTE,
	DWARF_DECL_COORDINATES and DWARF_TIMESTAMPS dependend declarations.
	(ordering_attribute): Removed.
	(output_array_type_die): Remove USE_ORDERING_ATTRIBUTE dependend
	code.
	(src_coords_attribute): Removed.
	(name_and_src_coords_attributes): Remove DWARF_DECL_COORDINATES usage.
	(dwarfout_init): Remove DWARF_TIMESTAMPS usage.

	* system.h: Poison USE_ORDERING_ATTRIBUTE, DWARF_DECL_COORDINATES
	and DWARF_TIMESTAMPS.

============================================================
Index: gcc/dwarfout.c
--- gcc/dwarfout.c	13 May 2003 18:06:45 -0000	1.123
+++ gcc/dwarfout.c	1 Jun 2003 08:02:10 -0000
@@ -338,13 +338,9 @@ Software Foundation, 59 Temple Place - S
 		 might be configured to generate a default value of 0xffffffff
 		 in this field (in cases where it is desired to have object
 		 files created at different times from identical source files
-		 be byte-for-byte identical).  By default, these timestamps
-		 are *not* generated by dwarfout.c (so that object files
-		 compiled at different times will be byte-for-byte identical).
-		 If you wish to enable this "timestamp" feature however, you
-		 can simply place a #define for the symbol `DWARF_TIMESTAMPS'
-		 in your target configuration file and then rebuild the GNU
-		 compiler(s).
+		 be byte-for-byte identical).  These timestamps are *not*
+		 generated by dwarfout.c (so that object files compiled at
+		 different times will be byte-for-byte identical).
 
  Note that the first string placed into the .debug_sfnames section for each
  compilation unit is the name of the directory in which compilation occurred.
@@ -834,9 +830,6 @@ static inline void fund_type_attribute	P
 static void mod_fund_type_attribute	PARAMS ((tree, int, int));
 static inline void user_def_type_attribute PARAMS ((tree));
 static void mod_u_d_type_attribute	PARAMS ((tree, int, int));
-#ifdef USE_ORDERING_ATTRIBUTE
-static inline void ordering_attribute	PARAMS ((unsigned));
-#endif /* defined(USE_ORDERING_ATTRIBUTE) */
 static void subscript_data_attribute	PARAMS ((tree));
 static void byte_size_attribute		PARAMS ((tree));
 static inline void bit_offset_attribute	PARAMS ((tree));
@@ -861,9 +854,6 @@ static inline void producer_attribute	PA
 static inline void inline_attribute	PARAMS ((tree));
 static inline void containing_type_attribute PARAMS ((tree));
 static inline void abstract_origin_attribute PARAMS ((tree));
-#ifdef DWARF_DECL_COORDINATES
-static inline void src_coords_attribute PARAMS ((unsigned, unsigned));
-#endif /* defined(DWARF_DECL_COORDINATES) */
 static inline void pure_or_virtual_attribute PARAMS ((tree));
 static void name_and_src_coords_attributes PARAMS ((tree));
 static void type_attribute		PARAMS ((tree, int, int));
@@ -2956,16 +2946,6 @@ mod_u_d_type_attribute (type, decl_const
   ASM_OUTPUT_LABEL (asm_out_file, end_label);
 }
 
-#ifdef USE_ORDERING_ATTRIBUTE
-static inline void
-ordering_attribute (ordering)
-     unsigned ordering;
-{
-  ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_ordering);
-  ASM_OUTPUT_DWARF_DATA2 (asm_out_file, ordering);
-}
-#endif /* defined(USE_ORDERING_ATTRIBUTE) */
-
 /* Note that the block of subscript information for an array type also
    includes information about the element type of type given array type.  */
 
@@ -3433,18 +3413,6 @@ abstract_origin_attribute (origin)
   ASM_OUTPUT_DWARF_REF (asm_out_file, label);
 }
 
-#ifdef DWARF_DECL_COORDINATES
-static inline void
-src_coords_attribute (src_fileno, src_lineno)
-     unsigned src_fileno;
-     unsigned src_lineno;
-{
-  ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_src_coords);
-  ASM_OUTPUT_DWARF_DATA2 (asm_out_file, src_fileno);
-  ASM_OUTPUT_DWARF_DATA2 (asm_out_file, src_lineno);
-}
-#endif /* defined(DWARF_DECL_COORDINATES) */
-
 static inline void
 pure_or_virtual_attribute (func_decl)
      tree func_decl;
@@ -3475,30 +3443,7 @@ name_and_src_coords_attributes (decl)
   tree decl_name = DECL_NAME (decl);
 
   if (decl_name && IDENTIFIER_POINTER (decl_name))
-    {
-      name_attribute (IDENTIFIER_POINTER (decl_name));
-#ifdef DWARF_DECL_COORDINATES
-      {
-	register unsigned file_index;
-
-	/* This is annoying, but we have to pop out of the .debug section
-	   for a moment while we call `lookup_filename' because calling it
-	   may cause a temporary switch into the .debug_sfnames section and
-	   most svr4 assemblers are not smart enough to be able to nest
-	   section switches to any depth greater than one.  Note that we
-	   also can't skirt this issue by delaying all output to the
-	   .debug_sfnames section unit the end of compilation because that
-	   would cause us to have inter-section forward references and
-	   Fred Fish sez that m68k/svr4 assemblers botch those.  */
-
-	ASM_OUTPUT_POP_SECTION (asm_out_file);
-	file_index = lookup_filename (DECL_SOURCE_FILE (decl));
-	ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SECTION);
-
-	src_coords_attribute (file_index, DECL_SOURCE_LINE (decl));
-      }
-#endif /* defined(DWARF_DECL_COORDINATES) */
-    }
+    name_attribute (IDENTIFIER_POINTER (decl_name));
 }
 
 /* Many forms of DIEs contain a "type description" part.  The following
@@ -3665,20 +3610,6 @@ output_array_type_die (arg)
   sibling_attribute ();
   equate_type_number_to_die_number (type);
   member_attribute (TYPE_CONTEXT (type));
-
-  /* I believe that we can default the array ordering.  SDB will probably
-     do the right things even if AT_ordering is not present.  It's not
-     even an issue until we start to get into multidimensional arrays
-     anyway.  If SDB is ever caught doing the Wrong Thing for multi-
-     dimensional arrays, then we'll have to put the AT_ordering attribute
-     back in.  (But if and when we find out that we need to put these in,
-     we will only do so for multidimensional arrays.  After all, we don't
-     want to waste space in the .debug section now do we?)  */
-
-#ifdef USE_ORDERING_ATTRIBUTE
-  ordering_attribute (ORD_row_major);
-#endif /* defined(USE_ORDERING_ATTRIBUTE) */
-
   subscript_data_attribute (type);
 }
 
@@ -6327,11 +6258,7 @@ dwarfout_init (main_input_filename)
 	  ASM_OUTPUT_DWARF_ADDR (asm_out_file, SFNAMES_BEGIN_LABEL);
 	  ASM_OUTPUT_DWARF_ADDR (asm_out_file, TEXT_BEGIN_LABEL);
 	  ASM_OUTPUT_DWARF_ADDR (asm_out_file, TEXT_END_LABEL);
-#ifdef DWARF_TIMESTAMPS
-	  ASM_OUTPUT_DWARF_DATA4 (asm_out_file, time (NULL));
-#else
 	  ASM_OUTPUT_DWARF_DATA4 (asm_out_file, -1);
-#endif
 	  ASM_OUTPUT_POP_SECTION (asm_out_file);
 	}
 
============================================================
Index: gcc/system.h
--- gcc/system.h	31 May 2003 18:45:26 -0000	1.148
+++ gcc/system.h	1 Jun 2003 08:02:10 -0000
@@ -641,7 +641,8 @@ typedef char _Bool;
 	FUNCTION_BLOCK_PROFILER_EXIT MACHINE_STATE_SAVE			   \
 	MACHINE_STATE_RESTORE SCCS_DIRECTIVE SECTION_ASM_OP		   \
 	ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL ASM_OUTPUT_INTERNAL_LABEL \
-	OBJC_PROLOGUE ALLOCATE_TRAMPOLINE HANDLE_PRAGMA
+	OBJC_PROLOGUE ALLOCATE_TRAMPOLINE HANDLE_PRAGMA			   \
+	USE_ORDERING_ATTRIBUTE DWARF_DECL_COORDINATES DWARF_TIMESTAMPS 
 
 /* Hooks that are no longer used.  */
  #pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE	\

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030601/3a0a879d/attachment.sig>


More information about the Gcc-patches mailing list