This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Make late static cdtors DECL_IGNORED_P
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 27 Aug 2015 09:59:08 +0200 (CEST)
- Subject: [PATCH] Make late static cdtors DECL_IGNORED_P
- Authentication-results: sourceware.org; auth=none
I noticed that for late cdtors like those from coverage or asan and
friends get DIEs created late. Of course generating debug info for
them is quite pointless.
Bootstrapped and tested on x86_64-unknown-linux-gnu, gdb testsuite clean,
applied to trunk.
Richard.
2015-08-27 Richard Biener <rguenther@suse.de>
* ipa.c (cgraph_build_static_cdtor_1): Set DECL_IGNORED_P.
Index: gcc/ipa.c
===================================================================
--- gcc/ipa.c (revision 226966)
+++ gcc/ipa.c (working copy)
@@ -917,6 +917,7 @@ cgraph_build_static_cdtor_1 (char which,
TREE_STATIC (decl) = 1;
TREE_USED (decl) = 1;
DECL_ARTIFICIAL (decl) = 1;
+ DECL_IGNORED_P (decl) = 1;
DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (decl) = 1;
DECL_SAVED_TREE (decl) = body;
if (!targetm.have_ctors_dtors && final)