FreeBSD/contrib/gcc/cp/name-lookup.c
/* ...and a poplevel for class declarations.  */
and a poplevel for class declarations.
and a poplevel for class declarations .
void
poplevel_class (void)
{
  struct cp_binding_level *level = class_binding_level;
  cp_class_binding *cb;
  size_t i;
  tree shadowed;
  timevar_push (TV_NAME_LOOKUP);
  gcc_assert (level != 0);
  if (current_class_depth == 1)
    previous_class_level = level;
  for (shadowed = level->type_shadowed;
       shadowed;
       shadowed = TREE_CHAIN (shadowed))
    SET_IDENTIFIER_TYPE_VALUE (TREE_PURPOSE (shadowed), TREE_VALUE (shadowed));
  if (level->class_shadowed)
    {
      for (i = 0;
	   VEC_iterate (cp_class_binding, level->class_shadowed, i, cb);
	   ++i)
	{
	  IDENTIFIER_BINDING (cb->identifier) = cb->base->previous;
	  cxx_binding_free (cb->base);
	}
      ggc_free (level->class_shadowed);
      level->class_shadowed = NULL;
    }
  if (ENABLE_SCOPE_CHECKING)
    is_class_level = 1;
  leave_scope ();
  timevar_pop (TV_NAME_LOOKUP);
}
void poplevel_class ( void ) { struct cp_binding_level * level = class_binding_level ; cp_class_binding * cb ; size_t i ; tree shadowed ; timevar_push ( TV_NAME_LOOKUP ) ; gcc_assert ( level != 0 ) ; if ( current_class_depth == 1 ) previous_class_level = level ; for ( shadowed = level -> type_shadowed ; shadowed ; shadowed = TREE_CHAIN ( shadowed ) ) SET_IDENTIFIER_TYPE_VALUE ( TREE_PURPOSE ( shadowed ) , TREE_VALUE ( shadowed ) ) ; if ( level -> class_shadowed ) { for ( i = 0 ; VEC_iterate ( cp_class_binding , level -> class_shadowed , i , cb ) ; ++ i ) { IDENTIFIER_BINDING ( cb -> identifier ) = cb -> base -> previous ; cxx_binding_free ( cb -> base ) ; } ggc_free ( level -> class_shadowed ) ; level -> class_shadowed = NULL ; } if ( ENABLE_SCOPE_CHECKING ) is_class_level = 1 ; leave_scope ( ) ; timevar_pop ( TV_NAME_LOOKUP ) ; }
...and a poplevel for class declarations.
... and a poplevel for class declarations .
/* If we're leaving a toplevel class, cache its binding level.  */ /* Remove the bindings for all of the class-level declarations.  */ /* Now, pop out of the binding level which we created up in the
     `pushlevel_class' routine.  */