summaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-29 07:32:24 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-29 07:32:24 +0000
commitdf0b8dfbf385de54c49086268852751517dae2e2 (patch)
tree3f729b5594d5da5a16c67b490dbcdcd15da77804 /gcc/cgraphunit.c
parenta70a5e2c5886c7e188ccb1be38de030808d5bf4b (diff)
downloadgcc-df0b8dfbf385de54c49086268852751517dae2e2.tar.gz
Add missing part of previous commit.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160017 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index e7e9e29659e..ab6bf06c01a 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -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 =