mirror of git://gcc.gnu.org/git/gcc.git
compiler: Update for GCC push_cfun changes.
From-SVN: r191582
This commit is contained in:
parent
5ae27c9c1f
commit
9af5c88c8f
|
|
@ -476,7 +476,6 @@ Gogo::write_initialization_function(tree fndecl, tree init_stmt_list)
|
||||||
|
|
||||||
DECL_SAVED_TREE(fndecl) = init_stmt_list;
|
DECL_SAVED_TREE(fndecl) = init_stmt_list;
|
||||||
|
|
||||||
current_function_decl = fndecl;
|
|
||||||
if (DECL_STRUCT_FUNCTION(fndecl) == NULL)
|
if (DECL_STRUCT_FUNCTION(fndecl) == NULL)
|
||||||
push_struct_function(fndecl);
|
push_struct_function(fndecl);
|
||||||
else
|
else
|
||||||
|
|
@ -487,7 +486,6 @@ Gogo::write_initialization_function(tree fndecl, tree init_stmt_list)
|
||||||
|
|
||||||
cgraph_add_new_function(fndecl, false);
|
cgraph_add_new_function(fndecl, false);
|
||||||
|
|
||||||
current_function_decl = NULL_TREE;
|
|
||||||
pop_cfun();
|
pop_cfun();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -864,17 +862,13 @@ Gogo::write_globals()
|
||||||
// means that we need an fndecl.
|
// means that we need an fndecl.
|
||||||
if (init_fndecl == NULL_TREE)
|
if (init_fndecl == NULL_TREE)
|
||||||
init_fndecl = this->initialization_function_decl();
|
init_fndecl = this->initialization_function_decl();
|
||||||
current_function_decl = init_fndecl;
|
|
||||||
if (DECL_STRUCT_FUNCTION(init_fndecl) == NULL)
|
if (DECL_STRUCT_FUNCTION(init_fndecl) == NULL)
|
||||||
push_struct_function(init_fndecl);
|
push_struct_function(init_fndecl);
|
||||||
else
|
else
|
||||||
push_cfun(DECL_STRUCT_FUNCTION(init_fndecl));
|
push_cfun(DECL_STRUCT_FUNCTION(init_fndecl));
|
||||||
|
|
||||||
tree var_decl = is_sink ? NULL_TREE : vec[i];
|
tree var_decl = is_sink ? NULL_TREE : vec[i];
|
||||||
var_init_tree = no->var_value()->get_init_block(this, NULL,
|
var_init_tree = no->var_value()->get_init_block(this, NULL,
|
||||||
var_decl);
|
var_decl);
|
||||||
|
|
||||||
current_function_decl = NULL_TREE;
|
|
||||||
pop_cfun();
|
pop_cfun();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1126,15 +1120,12 @@ Named_object::get_tree(Gogo* gogo, Named_object* function)
|
||||||
cfun->function_end_locus =
|
cfun->function_end_locus =
|
||||||
func->block()->end_location().gcc_location();
|
func->block()->end_location().gcc_location();
|
||||||
|
|
||||||
current_function_decl = decl;
|
|
||||||
|
|
||||||
func->build_tree(gogo, this);
|
func->build_tree(gogo, this);
|
||||||
|
|
||||||
gimplify_function_tree(decl);
|
gimplify_function_tree(decl);
|
||||||
|
|
||||||
cgraph_finalize_function(decl, true);
|
cgraph_finalize_function(decl, true);
|
||||||
|
|
||||||
current_function_decl = NULL_TREE;
|
|
||||||
pop_cfun();
|
pop_cfun();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue