FreeBSD/contrib/gcc/c-decl.c
/* Given an IDENTIFIER tree for a class interface, find (if possible) and
   return the record type for the class interface.  */
Given an IDENTIFIER tree for a class interface, find (if possible) and
return the record type for the class interface.
Given an IDENTIFIER tree for a class interface find ( if possible ) and return the record type for the class interface .
tree
c_return_interface_record_type (tree typename)
{
  enum tree_code_class class;
  enum tree_code code;
  tree retval = NULL;
  if (typename == NULL)
    return retval;
  code = TREE_CODE (typename);
  class = TREE_CODE_CLASS (code);
  if (code != IDENTIFIER_NODE
      || class != tcc_exceptional)
    return retval;
  retval = I_TAG_DECL (typename);
  if (TREE_CODE (retval) != RECORD_TYPE)
    retval = NULL;
  return retval;
}
tree c_return_interface_record_type ( tree typename ) { enum tree_code_class class ; enum tree_code code ; tree retval = NULL ; if ( typename == NULL ) return retval ; code = TREE_CODE ( typename ) ; class = TREE_CODE_CLASS ( code ) ; if ( code != IDENTIFIER_NODE || class != tcc_exceptional ) return retval ; retval = I_TAG_DECL ( typename ) ; if ( TREE_CODE ( retval ) != RECORD_TYPE ) retval = NULL ; return retval ; }
Given an IDENTIFIER tree for a class interface, find (if possible) and
return the record type for the class interface.
Given an IDENTIFIER tree for a class interface find ( if possible ) and return the record type for the class interface .