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
c2a37c55
Commit
c2a37c55
authored
Sep 12, 1999
by
Bernd Schmidt
Committed by
Bernd Schmidt
Sep 12, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
define_function cleanup
From-SVN: r29360
parent
40c1bf53
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
29 deletions
+39
-29
gcc/cp/ChangeLog
+9
-0
gcc/cp/cp-tree.h
+4
-4
gcc/cp/decl.c
+25
-23
gcc/cp/except.c
+1
-2
No files found.
gcc/cp/ChangeLog
View file @
c2a37c55
1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
* cp-tree.h (auto_function, define_function): Adjust prototypes.
* decl.c (define_function): Lose FUNCTION_CODE arg. All callers
changed.
(auto_function): Likewise, for CODE arg.
Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
(builtin_function): ... here.
1999-09-11 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (CLEANUP_STMT): New node.
...
...
gcc/cp/cp-tree.h
View file @
c2a37c55
...
...
@@ -3177,12 +3177,12 @@ extern tree namespace_ancestor PROTO((tree, tree));
extern
tree
unqualified_namespace_lookup
PROTO
((
tree
,
int
,
tree
*
));
extern
int
lookup_using_namespace
PROTO
((
tree
,
tree
,
tree
,
tree
,
int
,
tree
*
));
extern
int
qualified_lookup_using_namespace
PROTO
((
tree
,
tree
,
tree
,
int
));
extern
tree
auto_function
PROTO
((
tree
,
tree
,
enum
built_in_function
));
extern
tree
auto_function
PROTO
((
tree
,
tree
));
extern
void
init_decl_processing
PROTO
((
void
));
extern
int
init_type_desc
PROTO
((
void
));
extern
tree
define_function
PROTO
((
const
char
*
,
tree
,
enum
built_in_function
,
void
(
*
)
(
tree
),
const
char
*
));
extern
tree
define_function
PROTO
((
const
char
*
,
tree
,
void
(
*
)
(
tree
)
,
const
char
*
));
extern
tree
check_tag_decl
PROTO
((
tree
));
extern
void
shadow_tag
PROTO
((
tree
));
extern
tree
groktypename
PROTO
((
tree
));
...
...
gcc/cp/decl.c
View file @
c2a37c55
...
...
@@ -5947,12 +5947,12 @@ push_overloaded_decl_1 (x)
__inline
#endif
tree
auto_function
(
name
,
type
,
code
)
auto_function
(
name
,
type
)
tree
name
,
type
;
enum
built_in_function
code
;
enum
built_in_function
;
{
return
define_function
(
IDENTIFIER_POINTER
(
name
),
type
,
code
,
push_overloaded_decl_1
,
(
IDENTIFIER_POINTER
(
name
),
type
,
push_overloaded_decl_1
,
IDENTIFIER_POINTER
(
build_decl_overload
(
name
,
TYPE_ARG_TYPES
(
type
),
0
)));
}
...
...
@@ -6309,16 +6309,15 @@ init_decl_processing ()
newtype
=
build_exception_variant
(
ptr_ftype_sizetype
,
add_exception_specifier
(
NULL_TREE
,
bad_alloc_type_node
,
-
1
));
deltype
=
build_exception_variant
(
void_ftype_ptr
,
empty_except_spec
);
auto_function
(
ansi_opname
[(
int
)
NEW_EXPR
],
newtype
,
NOT_BUILT_IN
);
auto_function
(
ansi_opname
[(
int
)
VEC_NEW_EXPR
],
newtype
,
NOT_BUILT_IN
);
global_delete_fndecl
=
auto_function
(
ansi_opname
[(
int
)
DELETE_EXPR
],
deltype
,
NOT_BUILT_IN
);
auto_function
(
ansi_opname
[(
int
)
VEC_DELETE_EXPR
],
deltype
,
NOT_BUILT_IN
);
auto_function
(
ansi_opname
[(
int
)
NEW_EXPR
],
newtype
);
auto_function
(
ansi_opname
[(
int
)
VEC_NEW_EXPR
],
newtype
);
global_delete_fndecl
=
auto_function
(
ansi_opname
[(
int
)
DELETE_EXPR
],
deltype
);
auto_function
(
ansi_opname
[(
int
)
VEC_DELETE_EXPR
],
deltype
);
}
abort_fndecl
=
define_function
(
"__pure_virtual"
,
void_ftype
,
NOT_BUILT_IN
,
0
,
0
);
=
define_function
(
"__pure_virtual"
,
void_ftype
,
0
,
0
);
/* Perform other language dependent initializations. */
init_class_processing
();
...
...
@@ -6401,17 +6400,14 @@ lang_print_error_function (file)
/* Make a definition for a builtin function named NAME and whose data type
is TYPE. TYPE should be a function type with argument types.
FUNCTION_CODE tells later passes how to compile calls to this function.
See tree.h for its possible values.
If LIBRARY_NAME is nonzero, use that for DECL_ASSEMBLER_NAME,
the name to be called if we can't opencode the function. */
tree
define_function
(
name
,
type
,
function_code
,
pfn
,
library_name
)
define_function
(
name
,
type
,
pfn
,
library_name
)
const
char
*
name
;
tree
type
;
enum
built_in_function
function_code
;
void
(
*
pfn
)
PROTO
((
tree
));
const
char
*
library_name
;
{
...
...
@@ -6430,14 +6426,15 @@ define_function (name, type, function_code, pfn, library_name)
if
(
library_name
)
DECL_ASSEMBLER_NAME
(
decl
)
=
get_identifier
(
library_name
);
make_function_rtl
(
decl
);
if
(
function_code
!=
NOT_BUILT_IN
)
{
DECL_BUILT_IN
(
decl
)
=
1
;
DECL_FUNCTION_CODE
(
decl
)
=
function_code
;
}
return
decl
;
}
/* Wrapper around define_function, for the benefit of
c_common_nodes_and_builtins.
FUNCTION_CODE tells later passes how to compile calls to this function.
See tree.h for its possible values. */
tree
builtin_function
(
name
,
type
,
code
,
libname
)
const
char
*
name
;
...
...
@@ -6445,7 +6442,14 @@ builtin_function (name, type, code, libname)
enum
built_in_function
code
;
const
char
*
libname
;
{
return
define_function
(
name
,
type
,
code
,
(
void
(
*
)
PROTO
((
tree
)))
pushdecl
,
libname
);
tree
decl
=
define_function
(
name
,
type
,
(
void
(
*
)
PROTO
((
tree
)))
pushdecl
,
libname
);
if
(
code
!=
NOT_BUILT_IN
)
{
DECL_BUILT_IN
(
decl
)
=
1
;
DECL_FUNCTION_CODE
(
decl
)
=
code
;
}
return
decl
;
}
/* When we call finish_struct for an anonymous union, we create
...
...
@@ -7906,9 +7910,7 @@ destroy_local_static (decl)
=
define_function
(
"atexit"
,
build_function_type
(
void_type_node
,
pfvlist
),
NOT_BUILT_IN
,
/*pfn=*/
0
,
NULL_PTR
);
/*pfn=*/
0
,
NULL_PTR
);
mark_used
(
atexit_fndecl
);
atexit_node
=
default_conversion
(
atexit_fndecl
);
pop_lang_context
();
...
...
gcc/cp/except.c
View file @
c2a37c55
...
...
@@ -164,8 +164,7 @@ init_exception_processing ()
if
(
flag_honor_std
)
push_namespace
(
get_identifier
(
"std"
));
terminate_node
=
auto_function
(
get_identifier
(
"terminate"
),
vtype
,
NOT_BUILT_IN
);
terminate_node
=
auto_function
(
get_identifier
(
"terminate"
),
vtype
);
TREE_THIS_VOLATILE
(
terminate_node
)
=
1
;
if
(
flag_honor_std
)
pop_namespace
();
...
...
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