diff options
author | Sriraman Tallam <tmsriram@google.com> | 2012-11-13 21:56:30 +0000 |
---|---|---|
committer | Sriraman Tallam <tmsriram@gcc.gnu.org> | 2012-11-13 21:56:30 +0000 |
commit | beb42d2022899f07712a3537beedbedd13f67fab (patch) | |
tree | e0a478402322716f4df3e0475249558057df7da6 /gcc/cp/decl.c | |
parent | 73c3ed27fc6dc454b282d6e0d3fa76dbbd18e6dd (diff) | |
download | gcc-beb42d2022899f07712a3537beedbedd13f67fab.zip gcc-beb42d2022899f07712a3537beedbedd13f67fab.tar.gz gcc-beb42d2022899f07712a3537beedbedd13f67fab.tar.bz2 |
cgraph.c (insert_new_cgraph_node_version): Use cgraph_get_node instead of cgraph_get_create_node.
2012-11-13 Sriraman Tallam <tmsriram@google.com>
* cgraph.c (insert_new_cgraph_node_version): Use cgraph_get_node
instead of cgraph_get_create_node.
* config/i386/i386.c (ix86_get_function_versions_dispatcher): Move ifunc
not supported code to the end.
* class.c (mark_versions_used): Remove.
(resolve_address_of_overloaded_function): Call target hook
for versioned functions. Refactor to call
get_function_versions_dispatcher.
* decl.c (duplicate_decls): Add comments.
* cp/call.c (get_function_version_dispatcher): Expose function.
(mark_versions_used): Expose function.
* cp/cp-tree.h (mark_versions_used): New declaration.
(get_function_version_dispatcher): Ditto.
* testsuite/g++.dg/mv4.C: Add require ifunc. Change error message.
* testsuite/g++.dg/mv5.C: Add require ifunc.
* testsuite/g++.dg/mv6.C: Add require ifunc.
From-SVN: r193486
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 420937e..115c567 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -2307,12 +2307,15 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) else if (DECL_PRESERVE_P (newdecl)) DECL_PRESERVE_P (olddecl) = 1; - /* If the olddecl is a version, so is the newdecl. */ + /* Merge the DECL_FUNCTION_VERSIONED information. newdecl will be copied + to olddecl and deleted. */ if (TREE_CODE (newdecl) == FUNCTION_DECL && DECL_FUNCTION_VERSIONED (olddecl)) { + /* Set the flag for newdecl so that it gets copied to olddecl. */ DECL_FUNCTION_VERSIONED (newdecl) = 1; - /* newdecl will be purged and is no longer a version. */ + /* newdecl will be purged after copying to olddecl and is no longer + a version. */ delete_function_version (newdecl); } |