This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Make late static cdtors DECL_IGNORED_P


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]