FreeBSD/contrib/gcc/cp/decl.c
/* If DECL is not a local variable, give it RTL.  */
If DECL is not a local variable, give it RTL.
If DECL is not a local variable give it RTL .
static void
make_rtl_for_nonlocal_decl (tree decl, tree init, const char* asmspec)
{
  int toplev = toplevel_bindings_p ();
  int defer_p;
  const char *filename;
  if (asmspec)
    {
      if (TREE_CODE (decl) == VAR_DECL && DECL_REGISTER (decl))
	{
	  set_user_assembler_name (decl, asmspec);
	  DECL_HARD_REGISTER (decl) = 1;
	}
      else
	{
	  if (TREE_CODE (decl) == FUNCTION_DECL
	      && DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL)
	    set_builtin_user_assembler_name (decl, asmspec);
	  set_user_assembler_name (decl, asmspec);
	}
    }
  if (TREE_CODE (decl) != VAR_DECL)
    {
      rest_of_decl_compilation (decl, toplev, at_eof);
      return;
    }
  if (DECL_LANG_SPECIFIC (decl) && DECL_IN_AGGR_P (decl))
    {
      gcc_assert (TREE_STATIC (decl));
      if (init == NULL_TREE && TREE_PUBLIC (decl))
	gcc_assert (DECL_EXTERNAL (decl));
    }
  if (DECL_FUNCTION_SCOPE_P (decl) && !TREE_STATIC (decl))
    return;
  defer_p = DECL_FUNCTION_SCOPE_P (decl) || DECL_VIRTUAL_P (decl);
  filename = input_filename;
  if (!DECL_VIRTUAL_P (decl)
      && TREE_READONLY (decl)
      && DECL_INITIAL (decl) != NULL_TREE
      && DECL_INITIAL (decl) != error_mark_node
      && filename != NULL
      && ! EMPTY_CONSTRUCTOR_P (DECL_INITIAL (decl))
      && toplev
      && !TREE_PUBLIC (decl))
    {
      struct c_fileinfo *finfo = get_fileinfo (filename);
      if (!finfo->interface_unknown && !TREE_PUBLIC (decl))
	{
	  TREE_PUBLIC (decl) = 1;
	  DECL_EXTERNAL (decl) = finfo->interface_only;
	}
      defer_p = 1;
    }
  else if (DECL_LANG_SPECIFIC (decl)
	   && DECL_IMPLICIT_INSTANTIATION (decl))
    defer_p = 1;
  if (!defer_p)
    rest_of_decl_compilation (decl, toplev, at_eof);
}
static void make_rtl_for_nonlocal_decl ( tree decl , tree init , const char * asmspec ) { int toplev = toplevel_bindings_p ( ) ; int defer_p ; const char * filename ; if ( asmspec ) { if ( TREE_CODE ( decl ) == VAR_DECL && DECL_REGISTER ( decl ) ) { set_user_assembler_name ( decl , asmspec ) ; DECL_HARD_REGISTER ( decl ) = 1 ; } else { if ( TREE_CODE ( decl ) == FUNCTION_DECL && DECL_BUILT_IN_CLASS ( decl ) == BUILT_IN_NORMAL ) set_builtin_user_assembler_name ( decl , asmspec ) ; set_user_assembler_name ( decl , asmspec ) ; } } if ( TREE_CODE ( decl ) != VAR_DECL ) { rest_of_decl_compilation ( decl , toplev , at_eof ) ; return ; } if ( DECL_LANG_SPECIFIC ( decl ) && DECL_IN_AGGR_P ( decl ) ) { gcc_assert ( TREE_STATIC ( decl ) ) ; if ( init == NULL_TREE && TREE_PUBLIC ( decl ) ) gcc_assert ( DECL_EXTERNAL ( decl ) ) ; } if ( DECL_FUNCTION_SCOPE_P ( decl ) && ! TREE_STATIC ( decl ) ) return ; defer_p = DECL_FUNCTION_SCOPE_P ( decl ) || DECL_VIRTUAL_P ( decl ) ; filename = input_filename ; if ( ! DECL_VIRTUAL_P ( decl ) && TREE_READONLY ( decl ) && DECL_INITIAL ( decl ) != NULL_TREE && DECL_INITIAL ( decl ) != error_mark_node && filename != NULL && ! EMPTY_CONSTRUCTOR_P ( DECL_INITIAL ( decl ) ) && toplev && ! TREE_PUBLIC ( decl ) ) { struct c_fileinfo * finfo = get_fileinfo ( filename ) ; if ( ! finfo -> interface_unknown && ! TREE_PUBLIC ( decl ) ) { TREE_PUBLIC ( decl ) = 1 ; DECL_EXTERNAL ( decl ) = finfo -> interface_only ; } defer_p = 1 ; } else if ( DECL_LANG_SPECIFIC ( decl ) && DECL_IMPLICIT_INSTANTIATION ( decl ) ) defer_p = 1 ; if ( ! defer_p ) rest_of_decl_compilation ( decl , toplev , at_eof ) ; }
If DECL is not a local variable, give it RTL.
If DECL is not a local variable give it RTL .
/* Set the DECL_ASSEMBLER_NAME for the object.  */ /* The `register' keyword, when used together with an
	 asm-specification, indicates that the variable should be
	 placed in a particular register.  */ /* Handle non-variables up front.  */ /* If we see a class member here, it should be a static data
     member.  */ /* APPLE LOCAL begin templated static data 6298605 */ /* An in-class declaration of a static data member should be
	 external if the decl is accessible from outside this
	 translation unit (eg something not in an anonymous
	 namespace); it is only a declaration, and not a
	 definition.  */ /* APPLE LOCAL end templated static data 6298605 */ /* We don't create any RTL for local variables.  */ /* We defer emission of local statics until the corresponding
     DECL_EXPR is expanded.  */ /* We try to defer namespace-scope static constants so that they are
     not emitted into the object file unnecessarily.  */ /* Fool with the linkage of static consts according to #pragma
	 interface.  */ /* Likewise for template instantiations.  */ /* If we're not deferring, go ahead and assemble the variable.  */