Commit d560ee52 by Kaveh R. Ghazi Committed by Kaveh Ghazi

dwarf2out.c (dwarf2out_frame_debug_expr, [...]): Add static prototype.

        * dwarf2out.c (dwarf2out_frame_debug_expr, add_incomplete_type,
        retry_incomplete_types): Add static prototype.
        (stripattributes, dwarf_cfi_name, ASM_OUTPUT_DWARF_STRING,
        dwarf_tag_name, dwarf_attr_name, dwarf_form_name,
        dwarf_stack_op_name, dwarf_type_encoding_name, add_AT_string,
        dwarf2_name, add_name_attribute, lookup_filename, dwarf2out_line,
        dwarf2out_start_source_file, dwarf2out_define, dwarf2out_undef):
        Constify a char*.

        * dwarf2out.h (dwarf2out_define, dwarf2out_undef,
        dwarf2out_start_source_file, dwarf2out_line): Likewise.

From-SVN: r28645
parent ec940faa
Tue Aug 10 09:26:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* dwarf2out.c (dwarf2out_frame_debug_expr, add_incomplete_type,
retry_incomplete_types): Add static prototype.
(stripattributes, dwarf_cfi_name, ASM_OUTPUT_DWARF_STRING,
dwarf_tag_name, dwarf_attr_name, dwarf_form_name,
dwarf_stack_op_name, dwarf_type_encoding_name, add_AT_string,
dwarf2_name, add_name_attribute, lookup_filename, dwarf2out_line,
dwarf2out_start_source_file, dwarf2out_define, dwarf2out_undef):
Constify a char*.
* dwarf2out.h (dwarf2out_define, dwarf2out_undef,
dwarf2out_start_source_file, dwarf2out_line): Likewise.
Tue Aug 10 09:21:46 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Tue Aug 10 09:21:46 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* output.h (assemble_name): Constify a char*. * output.h (assemble_name): Constify a char*.
......
...@@ -186,8 +186,8 @@ static unsigned current_funcdef_fde; ...@@ -186,8 +186,8 @@ static unsigned current_funcdef_fde;
/* Forward declarations for functions defined in this file. */ /* Forward declarations for functions defined in this file. */
static char *stripattributes PROTO((char *)); static char *stripattributes PROTO((const char *));
static char *dwarf_cfi_name PROTO((unsigned)); static const char *dwarf_cfi_name PROTO((unsigned));
static dw_cfi_ref new_cfi PROTO((void)); static dw_cfi_ref new_cfi PROTO((void));
static void add_cfi PROTO((dw_cfi_ref *, dw_cfi_ref)); static void add_cfi PROTO((dw_cfi_ref *, dw_cfi_ref));
static unsigned long size_of_uleb128 PROTO((unsigned long)); static unsigned long size_of_uleb128 PROTO((unsigned long));
...@@ -205,6 +205,7 @@ static void output_cfi PROTO((dw_cfi_ref, dw_fde_ref)); ...@@ -205,6 +205,7 @@ static void output_cfi PROTO((dw_cfi_ref, dw_fde_ref));
static void output_call_frame_info PROTO((int)); static void output_call_frame_info PROTO((int));
static unsigned reg_number PROTO((rtx)); static unsigned reg_number PROTO((rtx));
static void dwarf2out_stack_adjust PROTO((rtx)); static void dwarf2out_stack_adjust PROTO((rtx));
static void dwarf2out_frame_debug_expr PROTO((rtx, char *));
/* Definitions of defaults for assembler-dependent names of various /* Definitions of defaults for assembler-dependent names of various
pseudo-ops and section names. pseudo-ops and section names.
...@@ -471,7 +472,7 @@ static void dwarf2out_stack_adjust PROTO((rtx)); ...@@ -471,7 +472,7 @@ static void dwarf2out_stack_adjust PROTO((rtx));
#define ASM_OUTPUT_DWARF_STRING(FILE,P) \ #define ASM_OUTPUT_DWARF_STRING(FILE,P) \
do { \ do { \
register int slen = strlen(P); \ register int slen = strlen(P); \
register char *p = (P); \ register const char *p = (P); \
register int i; \ register int i; \
fprintf (FILE, "\t.ascii \""); \ fprintf (FILE, "\t.ascii \""); \
for (i = 0; i < slen; i++) \ for (i = 0; i < slen; i++) \
...@@ -527,7 +528,7 @@ expand_builtin_dwarf_fp_regnum () ...@@ -527,7 +528,7 @@ expand_builtin_dwarf_fp_regnum ()
static inline char * static inline char *
stripattributes (s) stripattributes (s)
char *s; const char *s;
{ {
char *stripped = xmalloc (strlen (s) + 2); char *stripped = xmalloc (strlen (s) + 2);
char *p = stripped; char *p = stripped;
...@@ -667,7 +668,7 @@ expand_builtin_dwarf_reg_size (reg_tree, target) ...@@ -667,7 +668,7 @@ expand_builtin_dwarf_reg_size (reg_tree, target)
/* Convert a DWARF call frame info. operation to its string name */ /* Convert a DWARF call frame info. operation to its string name */
static char * static const char *
dwarf_cfi_name (cfi_opc) dwarf_cfi_name (cfi_opc)
register unsigned cfi_opc; register unsigned cfi_opc;
{ {
...@@ -2461,12 +2462,12 @@ static char *addr_to_string PROTO((rtx)); ...@@ -2461,12 +2462,12 @@ static char *addr_to_string PROTO((rtx));
static int is_pseudo_reg PROTO((rtx)); static int is_pseudo_reg PROTO((rtx));
static tree type_main_variant PROTO((tree)); static tree type_main_variant PROTO((tree));
static int is_tagged_type PROTO((tree)); static int is_tagged_type PROTO((tree));
static char *dwarf_tag_name PROTO((unsigned)); static const char *dwarf_tag_name PROTO((unsigned));
static char *dwarf_attr_name PROTO((unsigned)); static const char *dwarf_attr_name PROTO((unsigned));
static char *dwarf_form_name PROTO((unsigned)); static const char *dwarf_form_name PROTO((unsigned));
static char *dwarf_stack_op_name PROTO((unsigned)); static const char *dwarf_stack_op_name PROTO((unsigned));
#if 0 #if 0
static char *dwarf_type_encoding_name PROTO((unsigned)); static const char *dwarf_type_encoding_name PROTO((unsigned));
#endif #endif
static tree decl_ultimate_origin PROTO((tree)); static tree decl_ultimate_origin PROTO((tree));
static tree block_ultimate_origin PROTO((tree)); static tree block_ultimate_origin PROTO((tree));
...@@ -2487,7 +2488,8 @@ static void add_AT_float PROTO((dw_die_ref, ...@@ -2487,7 +2488,8 @@ static void add_AT_float PROTO((dw_die_ref,
enum dwarf_attribute, enum dwarf_attribute,
unsigned, long *)); unsigned, long *));
static void add_AT_string PROTO((dw_die_ref, static void add_AT_string PROTO((dw_die_ref,
enum dwarf_attribute, char *)); enum dwarf_attribute,
const char *));
static void add_AT_die_ref PROTO((dw_die_ref, static void add_AT_die_ref PROTO((dw_die_ref,
enum dwarf_attribute, enum dwarf_attribute,
dw_die_ref)); dw_die_ref));
...@@ -2551,7 +2553,7 @@ static void output_loc_operands PROTO((dw_loc_descr_ref)); ...@@ -2551,7 +2553,7 @@ static void output_loc_operands PROTO((dw_loc_descr_ref));
static unsigned long sibling_offset PROTO((dw_die_ref)); static unsigned long sibling_offset PROTO((dw_die_ref));
static void output_die PROTO((dw_die_ref)); static void output_die PROTO((dw_die_ref));
static void output_compilation_unit_header PROTO((void)); static void output_compilation_unit_header PROTO((void));
static char *dwarf2_name PROTO((tree, int)); static const char *dwarf2_name PROTO((tree, int));
static void add_pubname PROTO((tree, dw_die_ref)); static void add_pubname PROTO((tree, dw_die_ref));
static void output_pubnames PROTO((void)); static void output_pubnames PROTO((void));
static void add_arange PROTO((tree, dw_die_ref)); static void add_arange PROTO((tree, dw_die_ref));
...@@ -2579,7 +2581,7 @@ static void add_AT_location_description PROTO((dw_die_ref, ...@@ -2579,7 +2581,7 @@ static void add_AT_location_description PROTO((dw_die_ref,
static void add_data_member_location_attribute PROTO((dw_die_ref, tree)); static void add_data_member_location_attribute PROTO((dw_die_ref, tree));
static void add_const_value_attribute PROTO((dw_die_ref, rtx)); static void add_const_value_attribute PROTO((dw_die_ref, rtx));
static void add_location_or_const_value_attribute PROTO((dw_die_ref, tree)); static void add_location_or_const_value_attribute PROTO((dw_die_ref, tree));
static void add_name_attribute PROTO((dw_die_ref, char *)); static void add_name_attribute PROTO((dw_die_ref, const char *));
static void add_bound_info PROTO((dw_die_ref, static void add_bound_info PROTO((dw_die_ref,
enum dwarf_attribute, tree)); enum dwarf_attribute, tree));
static void add_subscript_info PROTO((dw_die_ref, tree)); static void add_subscript_info PROTO((dw_die_ref, tree));
...@@ -2635,7 +2637,9 @@ static void gen_block_die PROTO((tree, dw_die_ref, int)); ...@@ -2635,7 +2637,9 @@ static void gen_block_die PROTO((tree, dw_die_ref, int));
static void decls_for_scope PROTO((tree, dw_die_ref, int)); static void decls_for_scope PROTO((tree, dw_die_ref, int));
static int is_redundant_typedef PROTO((tree)); static int is_redundant_typedef PROTO((tree));
static void gen_decl_die PROTO((tree, dw_die_ref)); static void gen_decl_die PROTO((tree, dw_die_ref));
static unsigned lookup_filename PROTO((char *)); static unsigned lookup_filename PROTO((const char *));
static void add_incomplete_type PROTO((tree));
static void retry_incomplete_types PROTO((void));
/* Section names used to hold DWARF debugging information. */ /* Section names used to hold DWARF debugging information. */
#ifndef DEBUG_INFO_SECTION #ifndef DEBUG_INFO_SECTION
...@@ -2936,7 +2940,7 @@ is_tagged_type (type) ...@@ -2936,7 +2940,7 @@ is_tagged_type (type)
/* Convert a DIE tag into its string name. */ /* Convert a DIE tag into its string name. */
static char * static const char *
dwarf_tag_name (tag) dwarf_tag_name (tag)
register unsigned tag; register unsigned tag;
{ {
...@@ -3053,7 +3057,7 @@ dwarf_tag_name (tag) ...@@ -3053,7 +3057,7 @@ dwarf_tag_name (tag)
/* Convert a DWARF attribute code into its string name. */ /* Convert a DWARF attribute code into its string name. */
static char * static const char *
dwarf_attr_name (attr) dwarf_attr_name (attr)
register unsigned attr; register unsigned attr;
{ {
...@@ -3226,7 +3230,7 @@ dwarf_attr_name (attr) ...@@ -3226,7 +3230,7 @@ dwarf_attr_name (attr)
/* Convert a DWARF value form code into its string name. */ /* Convert a DWARF value form code into its string name. */
static char * static const char *
dwarf_form_name (form) dwarf_form_name (form)
register unsigned form; register unsigned form;
{ {
...@@ -3281,7 +3285,7 @@ dwarf_form_name (form) ...@@ -3281,7 +3285,7 @@ dwarf_form_name (form)
/* Convert a DWARF stack opcode into its string name. */ /* Convert a DWARF stack opcode into its string name. */
static char * static const char *
dwarf_stack_op_name (op) dwarf_stack_op_name (op)
register unsigned op; register unsigned op;
{ {
...@@ -3585,7 +3589,7 @@ dwarf_stack_op_name (op) ...@@ -3585,7 +3589,7 @@ dwarf_stack_op_name (op)
/* Convert a DWARF type code into its string name. */ /* Convert a DWARF type code into its string name. */
#if 0 #if 0
static char * static const char *
dwarf_type_encoding_name (enc) dwarf_type_encoding_name (enc)
register unsigned enc; register unsigned enc;
{ {
...@@ -3804,7 +3808,7 @@ static inline void ...@@ -3804,7 +3808,7 @@ static inline void
add_AT_string (die, attr_kind, str) add_AT_string (die, attr_kind, str)
register dw_die_ref die; register dw_die_ref die;
register enum dwarf_attribute attr_kind; register enum dwarf_attribute attr_kind;
register char *str; register const char *str;
{ {
register dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node)); register dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node));
...@@ -5518,7 +5522,7 @@ output_compilation_unit_header () ...@@ -5518,7 +5522,7 @@ output_compilation_unit_header ()
of decl_printable_name for C++ looks like "A::f(int)". Let's drop the of decl_printable_name for C++ looks like "A::f(int)". Let's drop the
argument list, and maybe the scope. */ argument list, and maybe the scope. */
static char * static const char *
dwarf2_name (decl, scope) dwarf2_name (decl, scope)
tree decl; tree decl;
int scope; int scope;
...@@ -7269,7 +7273,7 @@ add_location_or_const_value_attribute (die, decl) ...@@ -7269,7 +7273,7 @@ add_location_or_const_value_attribute (die, decl)
static inline void static inline void
add_name_attribute (die, name_string) add_name_attribute (die, name_string)
register dw_die_ref die; register dw_die_ref die;
register char *name_string; register const char *name_string;
{ {
if (name_string != NULL && *name_string != 0) if (name_string != NULL && *name_string != 0)
add_AT_string (die, DW_AT_name, name_string); add_AT_string (die, DW_AT_name, name_string);
...@@ -9793,7 +9797,7 @@ dwarf2out_label (insn) ...@@ -9793,7 +9797,7 @@ dwarf2out_label (insn)
static unsigned static unsigned
lookup_filename (file_name) lookup_filename (file_name)
char *file_name; const char *file_name;
{ {
static unsigned last_file_lookup_index = 0; static unsigned last_file_lookup_index = 0;
register unsigned i; register unsigned i;
...@@ -9835,7 +9839,7 @@ lookup_filename (file_name) ...@@ -9835,7 +9839,7 @@ lookup_filename (file_name)
void void
dwarf2out_line (filename, line) dwarf2out_line (filename, line)
register char *filename; register const char *filename;
register unsigned line; register unsigned line;
{ {
if (debug_info_level >= DINFO_LEVEL_NORMAL) if (debug_info_level >= DINFO_LEVEL_NORMAL)
...@@ -9904,7 +9908,7 @@ dwarf2out_line (filename, line) ...@@ -9904,7 +9908,7 @@ dwarf2out_line (filename, line)
void void
dwarf2out_start_source_file (filename) dwarf2out_start_source_file (filename)
register char *filename ATTRIBUTE_UNUSED; register const char *filename ATTRIBUTE_UNUSED;
{ {
} }
...@@ -9923,7 +9927,7 @@ dwarf2out_end_source_file () ...@@ -9923,7 +9927,7 @@ dwarf2out_end_source_file ()
void void
dwarf2out_define (lineno, buffer) dwarf2out_define (lineno, buffer)
register unsigned lineno ATTRIBUTE_UNUSED; register unsigned lineno ATTRIBUTE_UNUSED;
register char *buffer ATTRIBUTE_UNUSED; register const char *buffer ATTRIBUTE_UNUSED;
{ {
static int initialized = 0; static int initialized = 0;
if (!initialized) if (!initialized)
...@@ -9940,7 +9944,7 @@ dwarf2out_define (lineno, buffer) ...@@ -9940,7 +9944,7 @@ dwarf2out_define (lineno, buffer)
void void
dwarf2out_undef (lineno, buffer) dwarf2out_undef (lineno, buffer)
register unsigned lineno ATTRIBUTE_UNUSED; register unsigned lineno ATTRIBUTE_UNUSED;
register char *buffer ATTRIBUTE_UNUSED; register const char *buffer ATTRIBUTE_UNUSED;
{ {
} }
......
...@@ -22,16 +22,16 @@ extern void dwarf2out_init PROTO ((FILE *asm_out_file, ...@@ -22,16 +22,16 @@ extern void dwarf2out_init PROTO ((FILE *asm_out_file,
char *main_input_filename)); char *main_input_filename));
extern void dwarf2out_finish PROTO ((void)); extern void dwarf2out_finish PROTO ((void));
extern void dwarf2out_define PROTO ((unsigned, char *)); extern void dwarf2out_define PROTO ((unsigned, const char *));
extern void dwarf2out_undef PROTO ((unsigned, char *)); extern void dwarf2out_undef PROTO ((unsigned, const char *));
extern void dwarf2out_start_source_file PROTO ((char *)); extern void dwarf2out_start_source_file PROTO ((const char *));
extern void dwarf2out_end_source_file PROTO ((void)); extern void dwarf2out_end_source_file PROTO ((void));
extern void dwarf2out_begin_block PROTO ((unsigned)); extern void dwarf2out_begin_block PROTO ((unsigned));
extern void dwarf2out_end_block PROTO ((unsigned)); extern void dwarf2out_end_block PROTO ((unsigned));
extern void dwarf2out_label PROTO ((rtx)); extern void dwarf2out_label PROTO ((rtx));
extern void dwarf2out_decl PROTO ((tree)); extern void dwarf2out_decl PROTO ((tree));
extern void dwarf2out_line PROTO ((char *, unsigned)); extern void dwarf2out_line PROTO ((const char *, unsigned));
extern void dwarf2out_frame_init PROTO ((void)); extern void dwarf2out_frame_init PROTO ((void));
extern void dwarf2out_frame_debug PROTO ((rtx)); extern void dwarf2out_frame_debug PROTO ((rtx));
extern void dwarf2out_frame_finish PROTO ((void)); extern void dwarf2out_frame_finish PROTO ((void));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment