diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-10 16:12:21 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-10 16:12:21 +0000 |
commit | 7260826dd33354c89105f1ebfc1a021dfbcbecbf (patch) | |
tree | 9c8ca24ffe36df06c483d82a49f4e61dcb15c17e /gcc/output.h | |
parent | 3aa2fa443f8de74ae74fb13ec81ce2edc1b29a82 (diff) | |
download | gcc-7260826dd33354c89105f1ebfc1a021dfbcbecbf.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217293 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/output.h')
-rw-r--r-- | gcc/output.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/output.h b/gcc/output.h index f213b996429..e19fdd3f42b 100644 --- a/gcc/output.h +++ b/gcc/output.h @@ -178,6 +178,9 @@ extern void default_assemble_visibility (tree, int); for an `asm' keyword used between functions. */ extern void assemble_asm (tree); +/* Get the function's name from a decl, as described by its RTL. */ +extern const char *get_fnname_from_decl (tree); + /* Output assembler code for the constant pool of a function and associated with defining the name of the function. DECL describes the function. NAME is the function's name. For the constant pool, we use the current @@ -203,6 +206,10 @@ extern void assemble_variable (tree, int, int, int); into the preinit array. */ extern void assemble_vtv_preinit_initializer (tree); +/* Assemble everything that is needed for a variable declaration that has + no definition in the current translation unit. */ +extern void assemble_undefined_decl (tree); + /* Compute the alignment of variable specified by DECL. DONT_OUTPUT_DATA is from assemble_variable. */ extern void align_variable (tree decl, bool dont_output_data); |