From 63aec4bbdd77671b92dafbe6cb6e2e14f7a6635b Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Sun, 6 Mar 2016 16:42:52 -0800 Subject: remove unused functions --- gcc/config/arm/telf.h | 1 - gcc/rtl.h | 1 - gcc/tree.h | 2 -- gcc/varasm.c | 50 -------------------------------------------------- 4 files changed, 54 deletions(-) (limited to 'gcc') diff --git a/gcc/config/arm/telf.h b/gcc/config/arm/telf.h index 1144597..8c5d6e0 100755 --- a/gcc/config/arm/telf.h +++ b/gcc/config/arm/telf.h @@ -214,7 +214,6 @@ extern int arm_valid_machine_decl_attribute(tree decl, tree attributes, tree att #define NAME__MAIN "__gccmain" #define SYMBOL__MAIN __gccmain -#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) #define UNIQUE_SECTION_P(DECL) (DECL_ONE_ONLY (DECL)) #define UNIQUE_SECTION(DECL,RELOC) \ do { \ diff --git a/gcc/rtl.h b/gcc/rtl.h index 3ec2144..7d8b145 100755 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1484,7 +1484,6 @@ extern int set_dominates_use (int, int, int, rtx, rtx); /* In varasm.c */ extern void bss_section (void); extern int in_data_section (void); -extern int supports_one_only (void); /* In rtl.c */ extern void init_rtl (void); diff --git a/gcc/tree.h b/gcc/tree.h index 9dc6b96..7bb35a0 100755 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2233,8 +2233,6 @@ extern void fixup_signed_type (tree); /* varasm.c */ extern void make_decl_rtl (tree, char *, int); -extern void make_decl_one_only (tree); -extern int supports_one_only (void); extern void variable_section (tree, int); /* In fold-const.c */ diff --git a/gcc/varasm.c b/gcc/varasm.c index d8b62b8..00273bc 100755 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -4180,53 +4180,3 @@ assemble_alias (decl, target) #endif #endif } - -/* This determines whether or not we support link-once semantics. */ -#ifndef SUPPORTS_ONE_ONLY -#ifdef MAKE_DECL_ONE_ONLY -#define SUPPORTS_ONE_ONLY 1 -#else -#define SUPPORTS_ONE_ONLY 0 -#endif -#endif - -/* Returns 1 if the target configuration supports defining public symbols - so that one of them will be chosen at link time instead of generating a - multiply-defined symbol error, whether through the use of weak symbols or - a target-specific mechanism for having duplicates discarded. */ - -int -supports_one_only () -{ - if (SUPPORTS_ONE_ONLY) - return 1; - return SUPPORTS_WEAK; -} - -/* Set up DECL as a public symbol that can be defined in multiple - translation units without generating a linker error. */ - -void -make_decl_one_only (decl) - tree decl; -{ - if (TREE_CODE (decl) != VAR_DECL && TREE_CODE (decl) != FUNCTION_DECL) - abort (); - - TREE_PUBLIC (decl) = 1; - - if (TREE_CODE (decl) == VAR_DECL - && (DECL_INITIAL (decl) == 0 || DECL_INITIAL (decl) == error_mark_node)) - DECL_COMMON (decl) = 1; - else if (SUPPORTS_ONE_ONLY) - { -#ifdef MAKE_DECL_ONE_ONLY - MAKE_DECL_ONE_ONLY (decl); -#endif - DECL_ONE_ONLY (decl) = 1; - } - else if (SUPPORTS_WEAK) - DECL_WEAK (decl) = 1; - else - abort (); -} -- cgit v1.2.3