On 06/04/2015 02:23 PM, Jason Merrill wrote:
On 06/03/2015 10:42 AM, Aldy Hernandez wrote:
+ /* Die was generated early via dwarf2out_early_global_decl. */
+ BOOL_BITFIELD dumped_early : 1;
Missed a "dump".
Actually, why do we need this flag? The uses I see are
* to avoid declaring prototype parameters multiple times
Can't we just assume that if we have an old DIE, it already has parameters?
* to make the logic in gen_variable_die even more horrible
It's really not clear to me that we need the new big block of code. I
would think that it should be enough to update this:
/* If the compiler emitted a definition for the DECL declaration
+ and we already emitted a DIE for it, don't emit a second
DIE for it again. Allow re-declarations of DECLs that are
inside functions, though. */
- if (old_die && declaration && !local_scope_p (context_die))
return;
to add locations instead of just returning when !early_dwarf.
Incidentally, why did you change "declaration" to "!declaration" in this
condition?
Ah, wait. If we revert that mysterious change, it's clear again that
this check is just dealing with avoiding duplicate declarations, so
within this condition isn't the right place for adding locations to
early DIEs; that should probably happen right after this.
Jason