aboutsummaryrefslogtreecommitdiff
path: root/gcc/hooks.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2014-11-10 16:12:21 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2014-11-10 16:12:21 +0000
commit0d4b5b86f2020986ca74c4c79d425764b563f83f (patch)
tree9c8ca24ffe36df06c483d82a49f4e61dcb15c17e /gcc/hooks.c
parent42fd12b1e7fc50183bcf62861aae81301a9efbcf (diff)
downloadgcc-0d4b5b86f2020986ca74c4c79d425764b563f83f.zip
gcc-0d4b5b86f2020986ca74c4c79d425764b563f83f.tar.gz
gcc-0d4b5b86f2020986ca74c4c79d425764b563f83f.tar.bz2
Add a target hook for assembling undeclared decls.
* target.def (assemble_undefined_decl): New hooks. * hooks.c (hook_void_FILEptr_constcharptr_const_tree): New function. * hooks.h (hook_void_FILEptr_constcharptr_const_tree): Declare. * doc/tm.texi.in (TARGET_ASM_ASSEMBLE_UNDEFINED_DECL): Add. * doc/tm.texi: Regenerate. * output.h (assemble_undefined_decl): Declare. (get_fnname_from_decl): Declare. * varasm.c (assemble_undefined_decl): New function. (get_fnname_from_decl): New function. * final.c (rest_of_handle_final): Use it. * varpool.c (varpool_output_variables): Call assemble_undefined_decl for nodes without a definition. From-SVN: r217293
Diffstat (limited to 'gcc/hooks.c')
-rw-r--r--gcc/hooks.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/hooks.c b/gcc/hooks.c
index 91e17cd..356c64c 100644
--- a/gcc/hooks.c
+++ b/gcc/hooks.c
@@ -139,6 +139,13 @@ hook_void_FILEptr_constcharptr (FILE *a ATTRIBUTE_UNUSED, const char *b ATTRIBUT
{
}
+/* Generic hook that takes (FILE *, const char *, constr_tree *) and does
+ nothing. */
+void
+hook_void_FILEptr_constcharptr_const_tree (FILE *, const char *, const_tree)
+{
+}
+
/* Generic hook that takes (FILE *, rtx) and returns false. */
bool
hook_bool_FILEptr_rtx_false (FILE *a ATTRIBUTE_UNUSED,