This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: removes expand_constant language hook


This patch removes the expand_constant language hook.  Previously, it
was utilized only by the C++ front-end to convert constant pointers to
members to a type suitable for the varasm code.  This conversion is
now done during initializer storage in the front-end.

This is part of a larger effort to isolate the front-end language
hooks from the middle and back-ends in order to facilitate the link
time optimization project (and generally encourage clean separation of
code).

Tested with a C/C++ bootstrap and testsuite run on i686-pc-linux-gnu.

Ollie

:ADDPATCH c++:

2007-03-14 Ollie Wild <aaw@google.com>

      * varasm.c (compare_constant): Removed call to
      lang_hooks.expand_constant.
      (copy_constants): Removed call to lang_hooks.expand_constant.
      (compute_reloc_for_constant): Removed call to
      lang_hooks.expand_constant.
      (output_addressed_constants): Removed call to
      lang_hooks.expand_constant.
      (constructor_static_from_elts_p): Removed call to
      lang_hooks.expand_constant.
      (output_constant): Removed calls to lang_hooks.expand_constant.
      * langhooks.h (struct lang_hooks): Removed field expand_constant.
      * langhooks-def.h (lhd_return_tree): Removed.
      (LANG_HOOKS_EXPAND_CONSTANT): Removed.
      (LANG_HOOKS_INITIALIZER): Removed LANG_HOOKS_EXPAND_CONSTANT.
      * langhooks.c (lhd_return_tree): Removed.

2007-03-14 Ollie Wild <aaw@google.com>

      * typeck2.c (store_init_value): Call cplus_expand_constant after
      digest_init.
      * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
      * expr.c (cplus_expand_constant): Updated function description.

Attachment: no_expand_constant.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]