OSDN Git Service

Add missing part of previous commit.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 29 May 2010 07:32:24 +0000 (07:32 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 29 May 2010 07:32:24 +0000 (07:32 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160017 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cgraphunit.c

index e7e9e29..ab6bf06 100644 (file)
@@ -2181,6 +2181,12 @@ cgraph_function_versioning (struct cgraph_node *old_version_node,
   else
     new_decl = build_function_decl_skip_args (old_decl, args_to_skip);
 
+  cgraph_make_decl_local (new_decl);
+  /* Generate a new name for the new version. */
+  DECL_NAME (new_decl) = clone_function_name (old_decl, clone_name);
+  SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl));
+  SET_DECL_RTL (new_decl, NULL);
+
   /* Create the new version's call-graph node.
      and update the edges of the new node. */
   new_version_node =