Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
a1d7ffe3
Commit
a1d7ffe3
authored
Feb 16, 1997
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
From-SVN: r13652
parent
6e47932d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
29 deletions
+52
-29
gcc/c-common.c
+1
-4
gcc/dwarf2out.c
+26
-8
gcc/final.c
+1
-2
gcc/function.c
+1
-3
gcc/toplev.c
+14
-9
gcc/tree.h
+9
-3
No files found.
gcc/c-common.c
View file @
a1d7ffe3
...
...
@@ -65,15 +65,12 @@ declare_function_name ()
}
else
{
char
*
kind
=
"function"
;
if
(
TREE_CODE
(
TREE_TYPE
(
current_function_decl
))
==
METHOD_TYPE
)
kind
=
"method"
;
/* Allow functions to be nameless (such as artificial ones). */
if
(
DECL_NAME
(
current_function_decl
))
name
=
IDENTIFIER_POINTER
(
DECL_NAME
(
current_function_decl
));
else
name
=
""
;
printable_name
=
(
*
decl_printable_name
)
(
current_function_decl
,
&
kind
);
printable_name
=
(
*
decl_printable_name
)
(
current_function_decl
,
2
);
}
declare_hidden_char_array
(
"__FUNCTION__"
,
name
);
...
...
gcc/dwarf2out.c
View file @
a1d7ffe3
...
...
@@ -4443,6 +4443,18 @@ output_call_frame_info ()
}
}
/* The DWARF2 pubname for a nested thingy looks like "A::f". The output
of decl_printable_name for C++ looks like "A::f(int)". Let's drop the
argument list, and maybe the scope. */
static
char
*
dwarf2_name
(
decl
,
scope
)
tree
decl
;
int
scope
;
{
return
(
*
decl_printable_name
)
(
decl
,
scope
?
1
:
0
);
}
/* Add a new entry to .debug_pubnames if appropriate. */
static
void
add_pubname
(
decl
,
die
)
...
...
@@ -4462,7 +4474,8 @@ add_pubname (decl, die)
}
p
=
&
pubname_table
[
pubname_table_in_use
++
];
p
->
die
=
die
;
p
->
name
=
IDENTIFIER_POINTER
(
DECL_ASSEMBLER_NAME
(
decl
));
p
->
name
=
xstrdup
(
dwarf2_name
(
decl
,
1
));
}
/* Output the public names table used to speed up access to externally
...
...
@@ -4616,7 +4629,12 @@ output_aranges ()
if
(
a
->
die_tag
==
DW_TAG_subprogram
)
ASM_OUTPUT_DWARF_ADDR
(
asm_out_file
,
get_AT_low_pc
(
a
));
else
ASM_OUTPUT_DWARF_ADDR
(
asm_out_file
,
get_AT_string
(
a
,
DW_AT_name
));
{
char
*
name
=
get_AT_string
(
a
,
DW_AT_MIPS_linkage_name
);
if
(
!
name
)
name
=
get_AT_string
(
a
,
DW_AT_name
);
ASM_OUTPUT_DWARF_ADDR
(
asm_out_file
,
name
);
}
if
(
flag_verbose_asm
)
{
fprintf
(
asm_out_file
,
"
\t
%s Address"
,
ASM_COMMENT_START
);
...
...
@@ -6352,15 +6370,15 @@ add_name_and_src_coords_attributes (die, decl)
register
tree
decl
;
{
register
tree
decl_name
;
if
(
TREE_CODE
(
decl
)
==
FUNCTION_DECL
||
TREE_CODE
(
decl
)
==
VAR_DECL
)
decl_name
=
DECL_ASSEMBLER_NAME
(
decl
);
else
decl_name
=
DECL_NAME
(
decl
);
decl_name
=
DECL_NAME
(
decl
);
if
(
decl_name
&&
IDENTIFIER_POINTER
(
decl_name
))
{
add_name_attribute
(
die
,
IDENTIFIER_POINTER
(
decl_name
));
add_name_attribute
(
die
,
dwarf2_name
(
decl
,
0
));
add_src_coords_attributes
(
die
,
decl
);
if
((
TREE_CODE
(
decl
)
==
FUNCTION_DECL
||
TREE_CODE
(
decl
)
==
VAR_DECL
)
&&
DECL_ASSEMBLER_NAME
(
decl
)
!=
DECL_NAME
(
decl
))
add_AT_string
(
die
,
DW_AT_MIPS_linkage_name
,
IDENTIFIER_POINTER
(
DECL_ASSEMBLER_NAME
(
decl
)));
}
}
...
...
gcc/final.c
View file @
a1d7ffe3
...
...
@@ -955,9 +955,8 @@ final_start_function (first, file, optimize)
of the function name. */
if
(
profile_block_flag
)
{
char
*
junk
=
"function"
;
bb_func_label_num
=
add_bb_string
((
*
decl_printable_name
)
(
current_function_decl
,
&
junk
),
FALSE
);
add_bb_string
((
*
decl_printable_name
)
(
current_function_decl
,
2
),
FALSE
);
}
}
...
...
gcc/function.c
View file @
a1d7ffe3
...
...
@@ -4902,8 +4902,6 @@ init_function_start (subr, filename, line)
char
*
filename
;
int
line
;
{
char
*
junk
;
if
(
output_bytecode
)
{
this_function_decl
=
subr
;
...
...
@@ -4951,7 +4949,7 @@ init_function_start (subr, filename, line)
init_const_rtx_hash_table
();
current_function_name
=
(
*
decl_printable_name
)
(
subr
,
&
junk
);
current_function_name
=
(
*
decl_printable_name
)
(
subr
,
2
);
/* Nonzero if this is a nested function that uses a static chain. */
...
...
gcc/toplev.c
View file @
a1d7ffe3
...
...
@@ -292,9 +292,15 @@ int sorrycount = 0;
/* Flag to output bytecode instead of native assembler */
int
output_bytecode
=
0
;
/* Pointer to function to compute the name to use to print a declaration. */
/* Pointer to function to compute the name to use to print a declaration.
DECL is the declaration in question.
VERBOSITY determines what information will be printed:
0: DECL_NAME, demangled as necessary.
1: and scope information.
2: and any other information that might be interesting, such as function
parameter types in C++. */
char
*
(
*
decl_printable_name
)
();
char
*
(
*
decl_printable_name
)
(
/* tree decl, int verbosity */
);
/* Pointer to function to compute rtl for a language-specific tree code. */
...
...
@@ -1031,9 +1037,9 @@ fatal_insn_not_found (insn)
/* This is the default decl_printable_name function. */
static
char
*
decl_name
(
decl
,
kind
)
decl_name
(
decl
,
verbosity
)
tree
decl
;
char
**
kind
;
int
verbosity
;
{
return
IDENTIFIER_POINTER
(
DECL_NAME
(
decl
));
}
...
...
@@ -1057,11 +1063,10 @@ announce_function (decl)
{
if
(
!
quiet_flag
)
{
char
*
junk
;
if
(
rtl_dump_and_exit
)
fprintf
(
stderr
,
"%s "
,
IDENTIFIER_POINTER
(
DECL_NAME
(
decl
)));
else
fprintf
(
stderr
,
" %s"
,
(
*
decl_printable_name
)
(
decl
,
&
junk
));
fprintf
(
stderr
,
" %s"
,
(
*
decl_printable_name
)
(
decl
,
2
));
fflush
(
stderr
);
need_error_newline
=
1
;
last_error_function
=
current_function_decl
;
...
...
@@ -1089,7 +1094,7 @@ default_print_error_function (file)
fprintf
(
stderr
,
"At top level:
\n
"
);
else
{
char
*
name
=
(
*
decl_printable_name
)
(
current_function_decl
,
&
kind
);
char
*
name
=
(
*
decl_printable_name
)
(
current_function_decl
,
2
);
fprintf
(
stderr
,
"In %s `%s':
\n
"
,
kind
,
name
);
}
...
...
@@ -1187,7 +1192,7 @@ v_message_with_decl (decl, prefix, s, ap)
char
*
s
;
va_list
ap
;
{
char
*
n
,
*
p
,
*
junk
;
char
*
n
,
*
p
;
fprintf
(
stderr
,
"%s:%d: "
,
DECL_SOURCE_FILE
(
decl
),
DECL_SOURCE_LINE
(
decl
));
...
...
@@ -1223,7 +1228,7 @@ v_message_with_decl (decl, prefix, s, ap)
if
(
*
p
==
'%'
)
/* Print the name. */
{
char
*
n
=
(
DECL_NAME
(
decl
)
?
(
*
decl_printable_name
)
(
decl
,
&
junk
)
?
(
*
decl_printable_name
)
(
decl
,
2
)
:
"((anonymous))"
);
fputs
(
n
,
stderr
);
while
(
*
p
)
...
...
gcc/tree.h
View file @
a1d7ffe3
...
...
@@ -1639,9 +1639,15 @@ extern int current_function_calls_longjmp;
extern
int
all_types_permanent
;
/* Pointer to function to compute the name to use to print a declaration. */
extern
char
*
(
*
decl_printable_name
)
();
/* Pointer to function to compute the name to use to print a declaration.
DECL is the declaration in question.
VERBOSITY determines what information will be printed:
0: DECL_NAME, demangled as necessary.
1: and scope information.
2: and any other information that might be interesting, such as function
parameter types in C++. */
extern
char
*
(
*
decl_printable_name
)
(
/* tree decl, int verbosity */
);
/* Pointer to function to finish handling an incomplete decl at the
end of compilation. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment