This adds the assembler_name member to cgraph_function_version_info to store the base assembler name for the function to be mangled. This is used in later patches for refactoring FMV mangling.
gcc/ChangeLog: * cgraph.cc (cgraph_node::insert_new_function_version): Record assembler_name. * cgraph.h (struct cgraph_function_version_info): Add assembler_name. --- gcc/cgraph.cc | 1 + gcc/cgraph.h | 3 +++ 2 files changed, 4 insertions(+)
diff --git a/gcc/cgraph.cc b/gcc/cgraph.cc index a2ad2516c12..e81c7262d36 100644 --- a/gcc/cgraph.cc +++ b/gcc/cgraph.cc @@ -187,6 +187,7 @@ cgraph_node::insert_new_function_version (void) version_info_node = NULL; version_info_node = ggc_cleared_alloc<cgraph_function_version_info> (); version_info_node->this_node = this; + version_info_node->assembler_name = DECL_ASSEMBLER_NAME (this->decl); if (cgraph_fnver_htab == NULL) cgraph_fnver_htab = hash_table<function_version_hasher>::create_ggc (2); diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 6759505bf33..4a4fb7302b1 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -856,6 +856,9 @@ struct GTY((for_user)) cgraph_function_version_info { dispatcher. The dispatcher decl is an alias to the resolver function decl. */ tree dispatcher_resolver; + + /* The assmbly name of the function set before version mangling. */ + tree assembler_name; }; #define DEFCIFCODE(code, type, string) CIF_ ## code,