* 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
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.
PR c++/41109
/* There's no pending inline data for this function. */
DECL_PENDING_INLINE_INFO (clone) = NULL;
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. */
if (name == base_dtor_identifier)
unsigned thunk_p : 1;
unsigned this_thunk_p : 1;
unsigned hidden_friend_p : 1;
- unsigned deferred : 1;
- /* No spare bits; consider adding to lang_decl_base instead. */
+ /* 1 spare bit. */
/* For a non-thunk function decl, this is a tree list of
friendly classes. For a thunk function decl, it is the
#define CLASSTYPE_SORTED_FIELDS(NODE) \
(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
TEMPLATE_DECL, the entity is either a template specialization (if
DECL_USE_TEMPLATE is nonzero) or the abstract instance of the
void
note_vague_linkage_fn (tree decl)
{
- if (!DECL_DEFERRED_FN (decl))
- {
- DECL_DEFERRED_FN (decl) = 1;
- DECL_DEFER_OUTPUT (decl) = 1;
- VEC_safe_push (tree, gc, deferred_fns, decl);
- }
+ 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.
}
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. */
- {
- 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);
- }
+ note_vague_linkage_fn (decl);
/* Is it a synthesized method that needs to be synthesized? */
if (TREE_CODE (decl) == FUNCTION_DECL
&& DECL_DEFAULTED_FN (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
garbage collection. We must treat this situation as if we were
within the body of a function so as to avoid collecting live data
/* The THUNK is not a pending inline, even if the FUNCTION is. */
DECL_PENDING_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. */
DECL_USE_TEMPLATE (thunk) = 0;
DECL_TEMPLATE_INFO (thunk) = NULL;
DECL_NO_STATIC_CHAIN (alias) = 1;
DECL_PENDING_INLINE_P (alias) = 0;
DECL_DECLARED_INLINE_P (alias) = 0;
- DECL_DEFERRED_FN (alias) = 0;
DECL_USE_TEMPLATE (alias) = 0;
DECL_TEMPLATE_INSTANTIATED (alias) = 0;
DECL_TEMPLATE_INFO (alias) = NULL;