diff options
author | Jan Hubicka <jh@suse.cz> | 2007-04-22 17:33:32 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2007-04-22 15:33:32 +0000 |
commit | 395a40e0e28129430ca707dad8475fefad3d8782 (patch) | |
tree | 7a5b02a557aae27620a13c42bc29913de6d67d9e /gcc/cgraphunit.c | |
parent | b7716a8e90c72b98b9f92f20c1fa142e6573e05d (diff) | |
download | gcc-395a40e0e28129430ca707dad8475fefad3d8782.tar.gz |
misc.c (gnat_expand_body): Don't call target for destructors, avoid redundant check on syntax errors.
* ada/misc.c (gnat_expand_body): Don't call target for destructors,
avoid redundant check on syntax errors.
* final.c (rest_of_handle_final): Call
targetm.asm_out.constructor/targetm.asm_out.destructor
* cgraphunit.c (cgraph_build_static_cdtor): Don't do it here; set
proper priority via decl_*_priority_insert.
* c-common.c (c_expand_body): Likewise.
From-SVN: r124044
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 416cf3ecce9..13079a2b803 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1366,9 +1366,11 @@ cgraph_build_static_cdtor (char which, tree body, int priority) { case 'I': DECL_STATIC_CONSTRUCTOR (decl) = 1; + decl_init_priority_insert (decl, priority); break; case 'D': DECL_STATIC_DESTRUCTOR (decl) = 1; + decl_fini_priority_insert (decl, priority); break; default: gcc_unreachable (); @@ -1378,17 +1380,6 @@ cgraph_build_static_cdtor (char which, tree body, int priority) cgraph_add_new_function (decl, false); cgraph_mark_needed_node (cgraph_node (decl)); - - if (targetm.have_ctors_dtors) - { - void (*fn) (rtx, int); - - if (which == 'I') - fn = targetm.asm_out.constructor; - else - fn = targetm.asm_out.destructor; - fn (XEXP (DECL_RTL (decl), 0), priority); - } } void |