]> git.ipfire.org Git - thirdparty/gcc.git/commit
optinfo-emit-json.cc: don't call get_fnname_from_decl (PR middle-end/89725)
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Mar 2019 14:40:56 +0000 (14:40 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Mar 2019 14:40:56 +0000 (14:40 +0000)
commit2c151736b99bf4bc3902244fb61ff5300e38ae62
treedc36cb802fc35ebe41ae2a4b02a98cc678ef4bfb
parent62bc3eb21f55821cb36ca707cbeb6f27255f5379
optinfo-emit-json.cc: don't call get_fnname_from_decl (PR middle-end/89725)

optrecord_json_writer::optinfo_to_json can in theory be called from any
optimization pass, but currently uses get_fnname_from_decl, which
is RTL-specific.

In that PR, Jakub suggested using either DECL_ASSEMBLER_NAME or the
"printable name" (via current_function_name).

This patch makes it use DECL_ASSEMBLER_NAME.

gcc/ChangeLog:
PR middle-end/89725
* optinfo-emit-json.cc (optrecord_json_writer::optinfo_to_json):
Use DECL_ASSEMBLER_NAME rather than get_fnname_from_decl.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269994 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/optinfo-emit-json.cc