/* If these are versions of the same function, process and
move on. */
if (TREE_CODE (fn) == FUNCTION_DECL
- && maybe_version_functions (method, fn, true))
+ && maybe_version_functions (method, fn))
continue;
if (DECL_INHERITED_CTOR (method))
extern bool member_like_constrained_friend_p (tree);
extern bool fns_correspond (tree, tree);
extern int decls_match (tree, tree, bool = true);
-extern bool maybe_version_functions (tree, tree, bool);
+extern bool maybe_version_functions (tree, tree);
extern bool validate_constexpr_redeclaration (tree, tree);
extern bool merge_default_template_args (tree, tree, bool);
extern tree duplicate_decls (tree, tree,
&& targetm.target_option.function_versions (newdecl, olddecl))
{
if (record_versions)
- maybe_version_functions (newdecl, olddecl,
- (!DECL_FUNCTION_VERSIONED (newdecl)
- || !DECL_FUNCTION_VERSIONED (olddecl)));
+ maybe_version_functions (newdecl, olddecl);
return 0;
}
}
}
/* NEWDECL and OLDDECL have identical signatures. If they are
- different versions adjust them and return true.
- If RECORD is set to true, record function versions. */
+ different versions adjust them, record function versions, and return
+ true. */
bool
-maybe_version_functions (tree newdecl, tree olddecl, bool record)
+maybe_version_functions (tree newdecl, tree olddecl)
{
if (!targetm.target_option.function_versions (newdecl, olddecl))
return false;
maybe_mark_function_versioned (newdecl);
}
- if (record)
- {
- /* Add the new version to the function version structure. */
- cgraph_node *fn_node = cgraph_node::get_create (olddecl);
- cgraph_function_version_info *fn_v = fn_node->function_version ();
- if (!fn_v)
- fn_v = fn_node->insert_new_function_version ();
+ /* Add the new version to the function version structure. */
+ cgraph_node *fn_node = cgraph_node::get_create (olddecl);
+ cgraph_function_version_info *fn_v = fn_node->function_version ();
+ if (!fn_v)
+ fn_v = fn_node->insert_new_function_version ();
- cgraph_node::add_function_version (fn_v, newdecl);
- }
+ cgraph_node::add_function_version (fn_v, newdecl);
return true;
}