c++: Make static init generation more consistent
The end-of-compilation static init code generation functions are: * Inconsistent in argument ordering (swapping 'is-init' and 'priority', wrt each other and other arguments). * Inconsistent in naming. mostly calling the is-init argument 'initp', but sometimes calling it 'constructor_p' and in the worst case using a transcoded 'methody_type' character, and naming the priority argument 'initp'. * Inconsistent in typing. Sometimes the priority is unsigned, sometimes signed. And the initp argument can of course be a bool. * Several of the function comments have bit-rotted. This addresses those oddities. Name is-init 'initp', name priority 'priority'. Place initp first, make priority unsigned. gcc/cp/ * decl2.cc (start_objects): Replace 'method_type' parameter with 'initp' boolean, rename and retype 'priority' parameter. (finish_objects): Likewise. Do not expand here. (one_static_initialization_or_destruction): Move 'initp' parameter first. (do_static_initialization_or_destruction): Likewise. (generate_ctor_or_dtor_function): Rename 'initp' parameter. Adjust start_objects/finish_obects calls and expand here. (generate_ctor_and_dtor_functions_for_priority): Adjust calls. (c_parse_final_cleanups): Likewise. (vtv_start_verification_constructor_init): Adjust. (vtv_finish_verification_constructor_init): Use finish_objects.
Loading
Please register or sign in to comment