1/* Declarations for varasm.h.
2 Copyright (C) 2013-2017 Free Software Foundation, Inc.
4This file is part of GCC.
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 3, or (at your option) any later
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14for more details.
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
20#ifndef GCC_VARASM_H
21#define GCC_VARASM_H
23/* The following global holds the "function name" for the code in the
24 cold section of a function, if hot/cold function splitting is enabled
25 and there was actually code that went into the cold section. A
26 pseudo function name is needed for the cold section of code for some
27 debugging tools that perform symbolization. */
28extern tree cold_function_name;
30extern tree tree_output_constant_def (tree);
31extern void make_decl_rtl (tree);
32extern rtx make_decl_rtl_for_debug (tree);
33extern void make_decl_one_only (tree, tree);
34extern int supports_one_only (void);
35extern void resolve_unique_section (tree, int, int);
36extern void mark_referenced (tree);
37extern void mark_decl_referenced (tree);
38extern void notice_global_symbol (tree);
39extern void set_user_assembler_name (tree, const char *);
40extern void process_pending_assemble_externals (void);
41extern bool decl_replaceable_p (tree);
42extern bool decl_binds_to_current_def_p (const_tree);
43extern enum tls_model decl_default_tls_model (const_tree);
45/* Declare DECL to be a weak symbol. */
46extern void declare_weak (tree);
48/* Merge weak status. */
49extern void merge_weak (tree, tree);
51/* Make one symbol an alias for another. */
52extern void assemble_alias (tree, tree);
54/* Return nonzero if VALUE is a valid constant-valued expression
55 for use in initializing a static variable; one that can be an
56 element of a "constant" initializer.
58 Return null_pointer_node if the value is absolute;
59 if it is relocatable, return the variable that determines the relocation.
60 We assume that VALUE has been folded as much as possible;
61 therefore, we do not need to check for such things as
62 arithmetic-combinations of integers. */
63extern tree initializer_constant_valid_p (tree, tree, bool = false);
65/* Return true if VALUE is a valid constant-valued expression
66 for use in initializing a static bit-field; one that can be
67 an element of a "constant" initializer. */
68extern bool initializer_constant_valid_for_bitfield_p (tree);
70/* Whether a constructor CTOR is a valid static constant initializer if all
71 its elements are. This used to be internal to initializer_constant_valid_p
72 and has been exposed to let other functions like categorize_ctor_elements
73 evaluate the property while walking a constructor for other purposes. */
74extern bool constructor_static_from_elts_p (const_tree);
76extern void init_varasm_status (void);
78extern rtx assemble_static_space (unsigned HOST_WIDE_INT);
80extern rtx assemble_trampoline_template (void);
82#endif // GCC_VARASM_H