This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Delete C++ counterparts of the langhooks just removed
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 03 Apr 2008 13:39:41 +0200
- Subject: [PATCH] Delete C++ counterparts of the langhooks just removed
Interestingly, cxx_{push,pop}_function_context exists (like
c_{push,pop}_function_context) but is tied to different langhooks,
namely LANG_HOOKS_FUNCTION_INIT and LANG_HOOKS_FUNCTION_FINAL.
The latter just resets the language-specific part of struct function,
which can be inlined into the sole caller of the langhook so that it
applies to all languages.
The former is also interesting, because most of its code is already
dead. The langhook is called only from allocate_struct_function, which
means that f->decl == NULL (it is initialized later). Only two lines
remain, and I moved them to the sole caller of allocate_struct_function
in the C++ front-end.
Since I was at it, I moved the only remaining member of
lang_hooks.functions into the main langhook structure.
Bootstrapped/regtested i686-pc-linux-gnu, ok for mainline?
Paolo