diff options
author | Mark Harmstone <mark@harmstone.com> | 2024-08-26 22:40:56 +0100 |
---|---|---|
committer | Mark Harmstone <mark@harmstone.com> | 2024-08-29 02:53:08 +0100 |
commit | c5043d89449758ecf6a3f1475e027a73976f58c3 (patch) | |
tree | 981815fa92a4f0326eb1928b39068fa80b5181a0 /gcc/gimple-loop-jam.cc | |
parent | 6a9932ecdaac16c0fa21cc7c39589a3cd7cacf0f (diff) | |
download | gcc-c5043d89449758ecf6a3f1475e027a73976f58c3.zip gcc-c5043d89449758ecf6a3f1475e027a73976f58c3.tar.gz gcc-c5043d89449758ecf6a3f1475e027a73976f58c3.tar.bz2 |
Record member functions in CodeView struct definitions
CodeView has two ways of recording struct member functions.
Non-overloaded functions have an LF_ONEMETHOD sub-type in the field
list, which records the name and the function type (LF_MFUNCTION).
Overloaded functions have an LF_METHOD instead, which points to an
LF_METHODLIST, which is an array of links to various LF_MFUNCTION types.
gcc/
* dwarf2codeview.cc (enum cv_leaf_type): Add LF_MFUNCTION,
LF_METHODLIST, LF_METHOD, and LF_ONEMETHOD.
(struct codeview_subtype): Add lf_onemethod and lf_method to union.
(struct lf_methodlist_entry): New type.
(struct codeview_custom_type): Add lf_mfunc_id, lf_mfunction, and
lf_methodlist to union.
(struct codeview_method): New type.
(struct method_hasher): New type.
(get_type_num_subroutine_type): Add forward declaration.
(write_lf_fieldlist): Handle LF_ONEMETHOD and LF_METHOD.
(write_lf_mfunction): New function.
(write_lf_methodlist): New function.
(write_custom_types): Handle LF_MFUNCTION and LF_METHODLIST.
(add_struct_function): New function.
(get_mfunction_type): New function.
(is_templated_func): New function.
(get_type_num_struct): Handle DW_TAG_subprogram child DIEs.
(get_type_num_subroutine_type): Add containing_class_type, this_type,
and this_adjustment params, and handle creating LF_MFUNCTION types as
well as LF_PROCEDURE.
(get_type_num): New params for get_type_num_subroutine_type.
(add_function): New params for get_type_num_subroutine_type.
* dwarf2codeview.h (CV_METHOD_VANILLA, CV_METHOD_VIRTUAL): Define.
(CV_METHOD_STATIC, CV_METHOD_FRIEND, CV_METHOD_INTRO): Likewise.
(CV_METHOD_PUREVIRT, CV_METHOD_PUREINTRO): Likewise.
Diffstat (limited to 'gcc/gimple-loop-jam.cc')
0 files changed, 0 insertions, 0 deletions