Commit ecc75a19 by Andrew Pinski Committed by Andrew Pinski

class.c (make_local_function_alias): Only make a new decl if we support alias…

class.c (make_local_function_alias): Only make a new decl if we support alias attribute on all decls.

	* class.c (make_local_function_alias): Only make a new decl if we support
	alias attribute on all decls.

From-SVN: r86232
parent 699c914a
2004-08-18 Andrew Pinski <apinski@apple.com>
* class.c (make_local_function_alias): Only make a new decl if we support
alias attribute on all decls.
2004-08-18 Bryce McKinlay <mckinlay@redhat.com> 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
* class.c (make_local_function_alias): New function. Create local * class.c (make_local_function_alias): New function. Create local
......
...@@ -1201,12 +1201,13 @@ get_access_flags_from_decl (tree decl) ...@@ -1201,12 +1201,13 @@ get_access_flags_from_decl (tree decl)
static GTY (()) int alias_labelno = 0; static GTY (()) int alias_labelno = 0;
/* Create a private alias for METHOD. Using this alias instead of the method /* Create a private alias for METHOD. Using this alias instead of the method
decl ensures that ncode entries in the method table point to the real function decl ensures that ncode entries in the method table point to the real function
at runtime, not a PLT entry. */ at runtime, not a PLT entry. */
static tree static tree
make_local_function_alias (tree method) make_local_function_alias (tree method)
{ {
#ifdef ASM_OUTPUT_DEF
tree alias; tree alias;
const char *method_name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (method)); const char *method_name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (method));
char *name = alloca (strlen (method_name) + 1); char *name = alloca (strlen (method_name) + 1);
...@@ -1234,6 +1235,9 @@ make_local_function_alias (tree method) ...@@ -1234,6 +1235,9 @@ make_local_function_alias (tree method)
if (!flag_syntax_only) if (!flag_syntax_only)
assemble_alias (alias, DECL_ASSEMBLER_NAME (method)); assemble_alias (alias, DECL_ASSEMBLER_NAME (method));
return alias; return alias;
#else
return method;
#endif
} }
/** Make reflection data (_Jv_Field) for field FDECL. */ /** Make reflection data (_Jv_Field) for field FDECL. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment