On 06/04/2015 07:31 PM, Aldy Hernandez wrote:
So... if I revert the !declaration change and move the big block below
said change, would you be OK with it, or did you still want some changes
to it?

I'm still hoping to simplify it.  Actually, I think we can just remove the

   if (old_die && declaration && !local_scope_p (context_die))

check; since inverting its logic didn't seem to break anything before, it can just go.

And I'd like to rework the logic in the big block so we don't have three ways of getting to the same thing. Does this work?

       if (declaration)
         {
/* A declaration that has been previously dumped, needs no further annotations, since it doesn't need location on
              the second pass.  */
           return;
         }
       else if (origin && old_die->die_parent != context_die)
         {
/* If we will be creating an inlined instance, we need a new DIE that will get annotated with DW_AT_abstract_origin. Clear things so we can get a
              new DIE.  */
           gcc_assert (!DECL_ABSTRACT_P (decl));
           old_die = NULL;
         }
       else
         {
/* If a DIE was dumped early, it still needs location info.
              Skip to where we fill the location bits.  */
           var_die = old_die;
           goto gen_variable_die_location;
         }

Jason

Reply via email to