class.c (finish_struct_methods): Remove unncessary code.
authorMark Mitchell <mark@codesourcery.com>
Sat, 17 Jul 2004 07:31:08 +0000 (07:31 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sat, 17 Jul 2004 07:31:08 +0000 (07:31 +0000)
commit508a1c9c6d5d84df1207ff6d1e849e104b41694b
tree2d69e1c139bcf0ee4f483089d38a6c6ff542bbce
parent165b54c3f3249b748d8e7ac186d9ad93dab86d86
class.c (finish_struct_methods): Remove unncessary code.

* class.c (finish_struct_methods): Remove unncessary code.
(add_implicitly_declared_members): Create declarations for default
constructors and copy constructors lazily.
* cp-tree.h (lang_type_class): Remove lazy_default_ctor and
lazy_copy_ctor.
(CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
(CLASSTYPE_LAZY_COPY_CTOR): Likewise.
* decl2.c (check_classfn): Robustify.
(locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
(locate_ctor): Handle lazy default constructors.
(locate_copy): Handle lazy copy constructors.
(implicitly_declare_fn): Make sure we're looking at the
TYPE_MAIN_VARIANT for a class before creating functions.  Don't
set TYPE_HAS_CONSTRUCTOR.
(lazily_declare_fn): New function.
* name-lookup.c (constructor_name_full): Simplify.
* search.c (lookup_fnfields_1): Lazily create methods, as
necessary.
(lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.

From-SVN: r84851
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/cp/method.c
gcc/cp/name-lookup.c
gcc/cp/search.c