aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h27
1 files changed, 2 insertions, 25 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 1b843f8..03950d6 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -3002,31 +3002,6 @@ struct GTY(()) tree_parm_decl {
multiple translation units should be merged. */
#define DECL_ONE_ONLY(NODE) (DECL_COMDAT_GROUP (NODE) != NULL_TREE)
-/* A replaceable function is one which may be replaced at link-time
- with an entirely different definition, provided that the
- replacement has the same type. For example, functions declared
- with __attribute__((weak)) on most systems are replaceable.
-
- COMDAT functions are not replaceable, since all definitions of the
- function must be equivalent. It is important that COMDAT functions
- not be treated as replaceable so that use of C++ template
- instantiations is not penalized.
-
- In other respects, the condition is usually equivalent to whether
- the function binds to the current module (shared library or executable).
- However, weak functions can always be overridden by earlier TUs
- in the same module, even if they bind locally to that module.
-
- For example, DECL_REPLACEABLE is used to determine whether or not a
- function (including a template instantiation) which is not
- explicitly declared "inline" can be inlined. If the function is
- DECL_REPLACEABLE then it is not safe to do the inlining, since the
- implementation chosen at link-time may be different. However, a
- function that is not DECL_REPLACEABLE can be inlined, since all
- versions of the function will be functionally identical. */
-#define DECL_REPLACEABLE_P(NODE) \
- (!DECL_COMDAT (NODE) && (DECL_WEAK (NODE) || !targetm.binds_local_p (NODE)))
-
/* The name of the object as the assembler will see it (but before any
translations made by ASM_OUTPUT_LABELREF). Often this is the same
as DECL_NAME. It is an IDENTIFIER_NODE. */
@@ -5299,6 +5274,8 @@ extern void process_pending_assemble_externals (void);
extern void finish_aliases_1 (void);
extern void finish_aliases_2 (void);
extern void remove_unreachable_alias_pairs (void);
+extern bool decl_replaceable_p (tree);
+extern bool decl_binds_to_current_def_p (tree);
/* In stmt.c */
extern void expand_computed_goto (tree);