Commit 783a452c by Jason Merrill Committed by Jason Merrill

cp-tree.h (DECL_DEFERRED_FN): Remove.

	* cp-tree.h (DECL_DEFERRED_FN): Remove.
	(struct lang_decl_fn): Remove deferred flag.
	* class.c (build_clone): Don't set it.
	* decl2.c (note_vague_linkage_fn): Don't check or set it.
	(mark_used): Don't check it.
	* method.c (make_thunk, make_alias_for): Don't set it.

From-SVN: r151063
parent d9fbd03b
2009-08-24 Jason Merrill <jason@redhat.com> 2009-08-24 Jason Merrill <jason@redhat.com>
* cp-tree.h (DECL_DEFERRED_FN): Remove.
(struct lang_decl_fn): Remove deferred flag.
* class.c (build_clone): Don't set it.
* decl2.c (note_vague_linkage_fn): Don't check or set it.
(mark_used): Don't check it.
* method.c (make_thunk, make_alias_for): Don't set it.
* decl2.c (mark_used): Streamline logic. * decl2.c (mark_used): Streamline logic.
PR c++/41109 PR c++/41109
......
...@@ -3881,8 +3881,6 @@ build_clone (tree fn, tree name) ...@@ -3881,8 +3881,6 @@ build_clone (tree fn, tree name)
/* There's no pending inline data for this function. */ /* There's no pending inline data for this function. */
DECL_PENDING_INLINE_INFO (clone) = NULL; DECL_PENDING_INLINE_INFO (clone) = NULL;
DECL_PENDING_INLINE_P (clone) = 0; DECL_PENDING_INLINE_P (clone) = 0;
/* And it hasn't yet been deferred. */
DECL_DEFERRED_FN (clone) = 0;
/* The base-class destructor is not virtual. */ /* The base-class destructor is not virtual. */
if (name == base_dtor_identifier) if (name == base_dtor_identifier)
......
...@@ -1642,8 +1642,7 @@ struct GTY(()) lang_decl_fn { ...@@ -1642,8 +1642,7 @@ struct GTY(()) lang_decl_fn {
unsigned thunk_p : 1; unsigned thunk_p : 1;
unsigned this_thunk_p : 1; unsigned this_thunk_p : 1;
unsigned hidden_friend_p : 1; unsigned hidden_friend_p : 1;
unsigned deferred : 1; /* 1 spare bit. */
/* No spare bits; consider adding to lang_decl_base instead. */
/* For a non-thunk function decl, this is a tree list of /* For a non-thunk function decl, this is a tree list of
friendly classes. For a thunk function decl, it is the friendly classes. For a thunk function decl, it is the
...@@ -2235,10 +2234,6 @@ extern void decl_shadowed_for_var_insert (tree, tree); ...@@ -2235,10 +2234,6 @@ extern void decl_shadowed_for_var_insert (tree, tree);
#define CLASSTYPE_SORTED_FIELDS(NODE) \ #define CLASSTYPE_SORTED_FIELDS(NODE) \
(LANG_TYPE_CLASS_CHECK (NODE)->sorted_fields) (LANG_TYPE_CLASS_CHECK (NODE)->sorted_fields)
/* True if on the deferred_fns (see decl2.c) list. */
#define DECL_DEFERRED_FN(DECL) \
(LANG_DECL_FN_CHECK (DECL)->deferred)
/* If non-NULL for a VAR_DECL, FUNCTION_DECL, TYPE_DECL or /* If non-NULL for a VAR_DECL, FUNCTION_DECL, TYPE_DECL or
TEMPLATE_DECL, the entity is either a template specialization (if TEMPLATE_DECL, the entity is either a template specialization (if
DECL_USE_TEMPLATE is nonzero) or the abstract instance of the DECL_USE_TEMPLATE is nonzero) or the abstract instance of the
......
...@@ -703,12 +703,8 @@ check_classfn (tree ctype, tree function, tree template_parms) ...@@ -703,12 +703,8 @@ check_classfn (tree ctype, tree function, tree template_parms)
void void
note_vague_linkage_fn (tree decl) note_vague_linkage_fn (tree decl)
{ {
if (!DECL_DEFERRED_FN (decl)) DECL_DEFER_OUTPUT (decl) = 1;
{ VEC_safe_push (tree, gc, deferred_fns, decl);
DECL_DEFERRED_FN (decl) = 1;
DECL_DEFER_OUTPUT (decl) = 1;
VEC_safe_push (tree, gc, deferred_fns, decl);
}
} }
/* We have just processed the DECL, which is a static data member. /* We have just processed the DECL, which is a static data member.
...@@ -3932,21 +3928,9 @@ mark_used (tree decl) ...@@ -3932,21 +3928,9 @@ mark_used (tree decl)
} }
if (TREE_CODE (decl) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (decl) if (TREE_CODE (decl) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (decl)
&& !TREE_ASM_WRITTEN (decl)) && !DECL_INITIAL (decl) && !DECL_ARTIFICIAL (decl))
/* Remember it, so we can check it was defined. */ /* Remember it, so we can check it was defined. */
{ note_vague_linkage_fn (decl);
if (DECL_DEFERRED_FN (decl))
return;
/* Remember the current location for a function we will end up
synthesizing. Then we can inform the user where it was
required in the case of error. */
if (DECL_ARTIFICIAL (decl) && DECL_NONSTATIC_MEMBER_FUNCTION_P (decl)
&& !DECL_THUNK_P (decl))
DECL_SOURCE_LOCATION (decl) = input_location;
note_vague_linkage_fn (decl);
}
/* Is it a synthesized method that needs to be synthesized? */ /* Is it a synthesized method that needs to be synthesized? */
if (TREE_CODE (decl) == FUNCTION_DECL if (TREE_CODE (decl) == FUNCTION_DECL
...@@ -3954,6 +3938,11 @@ mark_used (tree decl) ...@@ -3954,6 +3938,11 @@ mark_used (tree decl)
&& DECL_DEFAULTED_FN (decl) && DECL_DEFAULTED_FN (decl)
&& ! DECL_INITIAL (decl)) && ! DECL_INITIAL (decl))
{ {
/* Remember the current location for a function we will end up
synthesizing. Then we can inform the user where it was
required in the case of error. */
DECL_SOURCE_LOCATION (decl) = input_location;
/* Synthesizing an implicitly defined member function will result in /* Synthesizing an implicitly defined member function will result in
garbage collection. We must treat this situation as if we were garbage collection. We must treat this situation as if we were
within the body of a function so as to avoid collecting live data within the body of a function so as to avoid collecting live data
......
...@@ -157,8 +157,6 @@ make_thunk (tree function, bool this_adjusting, ...@@ -157,8 +157,6 @@ make_thunk (tree function, bool this_adjusting,
/* The THUNK is not a pending inline, even if the FUNCTION is. */ /* The THUNK is not a pending inline, even if the FUNCTION is. */
DECL_PENDING_INLINE_P (thunk) = 0; DECL_PENDING_INLINE_P (thunk) = 0;
DECL_DECLARED_INLINE_P (thunk) = 0; DECL_DECLARED_INLINE_P (thunk) = 0;
/* Nor has it been deferred. */
DECL_DEFERRED_FN (thunk) = 0;
/* Nor is it a template instantiation. */ /* Nor is it a template instantiation. */
DECL_USE_TEMPLATE (thunk) = 0; DECL_USE_TEMPLATE (thunk) = 0;
DECL_TEMPLATE_INFO (thunk) = NULL; DECL_TEMPLATE_INFO (thunk) = NULL;
...@@ -286,7 +284,6 @@ make_alias_for (tree function, tree newid) ...@@ -286,7 +284,6 @@ make_alias_for (tree function, tree newid)
DECL_NO_STATIC_CHAIN (alias) = 1; DECL_NO_STATIC_CHAIN (alias) = 1;
DECL_PENDING_INLINE_P (alias) = 0; DECL_PENDING_INLINE_P (alias) = 0;
DECL_DECLARED_INLINE_P (alias) = 0; DECL_DECLARED_INLINE_P (alias) = 0;
DECL_DEFERRED_FN (alias) = 0;
DECL_USE_TEMPLATE (alias) = 0; DECL_USE_TEMPLATE (alias) = 0;
DECL_TEMPLATE_INSTANTIATED (alias) = 0; DECL_TEMPLATE_INSTANTIATED (alias) = 0;
DECL_TEMPLATE_INFO (alias) = NULL; DECL_TEMPLATE_INFO (alias) = NULL;
......
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