This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add attribute "artificial"
- From: Devang Patel <dpatel at apple dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Geoff Keating <geoffk at apple dot com>, Daniel Jacobowitz <drow at false dot org>, Daniel Berlin <dberlin at dberlin dot org>, Stuart Hastings <stuart at apple dot com>, Fariborz Jahanian <fjahanian at apple dot com>
- Date: Fri, 5 Aug 2005 16:00:27 -0700
- Subject: Re: [PATCH] Add attribute "artificial"
- References: <615DDEFA-C714-42B4-91B3-15AD0BC25AC3@apple.com> <42F3ED74.9010101@codesourcery.com>
On Aug 5, 2005, at 3:51 PM, Mark Mitchell wrote:
Devang Patel wrote:
As we discussed on Friday, this patch adds new attribute -
artificial.
STABS:
We do not need to set DECL_IGNORED_P bit. So, instead of removing
debug info. this patch updates the debug info. Inliner is updated
to adjust location info when "artificial" attribute is seen.
DWARF:
Setting DECL_ARTIFICIAL did not work because it does not survive
after duplicate_decls() etc. Plus C++ version takes different
action based on whether DECL_ARTIFICIAL is set or not. If we
really want to pursue that route then further changes will be
required. This patch does not overload DECL_ARTIFICIAL and keeps
everything clean and separate.
You are correct: setting DECL_ARTIFICIAL is not right. DECL_IGNORED
+P is what we should set. And, that should be debug backend
independent; there should be no need to modify the DWARF or DBX
backends.
People did not like the idea of not generating debug info at all
( and that's what setting DECL_IGNORED_P would do).
Also, "artificial" is not a good name for this attribute; "nodebug"
would be better.
Again people did not like "nodebug" name. Feel free to suggest better
name.
-
Devang