summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/tree-nested.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/tree-nested.c')
-rw-r--r--contrib/gcc/tree-nested.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/gcc/tree-nested.c b/contrib/gcc/tree-nested.c
index 9efcd98..7592712 100644
--- a/contrib/gcc/tree-nested.c
+++ b/contrib/gcc/tree-nested.c
@@ -1970,7 +1970,8 @@ static GTY(()) struct nesting_info *root;
subroutines and turn them into something less tightly bound. */
void
-lower_nested_functions (tree fndecl)
+/* APPLE LOCAL radar 6305545 */
+lower_nested_functions (tree fndecl, bool skip_outermost_fndecl)
{
struct cgraph_node *cgn;
@@ -1980,6 +1981,13 @@ lower_nested_functions (tree fndecl)
return;
root = create_nesting_tree (cgn);
+ /* APPLE LOCAL begin radar 6305545 */
+ /* If skip_outermost_fndecl is true, we are lowering nested functions of
+ a constructor/destructor which are cloned and thrown away. But we
+ still have to lower their nested functions, but not the outermost function. */
+ if (skip_outermost_fndecl)
+ root = root->inner;
+ /* APPLE LOCAL end radar 6305545 */
walk_all_functions (convert_nonlocal_reference, root);
walk_all_functions (convert_local_reference, root);
walk_all_functions (convert_nl_goto_reference, root);
OpenPOWER on IntegriCloud