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] 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


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