This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [debug-early] C++ clones and limbo DIEs
- From: Jason Merrill <jason at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 30 Jan 2015 17:04:23 -0500
- Subject: Re: [debug-early] C++ clones and limbo DIEs
- Authentication-results: sourceware.org; auth=none
- References: <54B87E5B dot 1090502 at redhat dot com> <54B88149 dot 1040906 at redhat dot com> <54B94F4D dot 4040009 at redhat dot com> <54B97854 dot 7040007 at redhat dot com> <54C296B5 dot 4050506 at redhat dot com> <54C7FA41 dot 8010903 at redhat dot com> <54C92A59 dot 4070401 at redhat dot com> <54C92A80 dot 80306 at redhat dot com> <54C92FA8 dot 9040005 at redhat dot com> <54CBEB69 dot 3000401 at redhat dot com>
On 01/30/2015 03:36 PM, Aldy Hernandez wrote:
/* It is possible to have both DECL_ABSTRACT_P and DECLARATION be true if we
started to generate the abstract instance of an inline, decided to output
its containing class, and proceeded to emit the declaration of the inline
from the member list for the class. If so, DECLARATION takes priority;
we'll get back to the abstract instance when done with the class. */
This comment is out of date; in this case decl_ultimate_origin will
return NULL_TREE, so origin is null, so we shouldn't need to deal with
this here.
+ /* ?? We must not reset `origin', so C++ clones get a proper
+ DW_AT_abstract_origin tagged DIE further on. */
+#if 0
/* The class-scope declaration DIE must be the primary DIE. */
if (origin && declaration && class_or_namespace_scope_p (context_die))
{
origin = NULL;
gcc_assert (!old_die);
}
+#endif
So I think this block is unnecessary.
Obviously, now we will get more DIEs than before (complete constructors, base constructors, and what have yous). Whereas previously we only generated a DIE for the used ones.
Hmm, that's unfortunate.
What if we leave the clone skipping alone here and emit early debug
about all reachable functions in
symbol_table::finalize_compilation_unit, between analyze_functions() and
compile()?
Jason