mirror of
https://github.com/pret/agbcc.git
synced 2026-04-24 23:10:04 -05:00
remove more unused code
This commit is contained in:
parent
0fd2209ea0
commit
fcfe6de111
|
|
@ -224,10 +224,6 @@ static unsigned reg_number (rtx);
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef FRAME_SECTION
|
||||
#define FRAME_SECTION ".debug_frame"
|
||||
#endif
|
||||
|
||||
#ifndef FUNC_BEGIN_LABEL
|
||||
#define FUNC_BEGIN_LABEL "LFB"
|
||||
#endif
|
||||
|
|
@ -459,29 +455,6 @@ static unsigned reg_number (rtx);
|
|||
while (0)
|
||||
#endif
|
||||
|
||||
/* The DWARF 2 CFA column which tracks the return address. Normally this
|
||||
is the column for PC, or the first column after all of the hard
|
||||
registers. */
|
||||
#ifndef DWARF_FRAME_RETURN_COLUMN
|
||||
#ifdef PC_REGNUM
|
||||
#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (PC_REGNUM)
|
||||
#else
|
||||
#define DWARF_FRAME_RETURN_COLUMN FIRST_PSEUDO_REGISTER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* The mapping from gcc register number to DWARF 2 CFA column number. By
|
||||
default, we just provide columns for all registers. */
|
||||
#ifndef DWARF_FRAME_REGNUM
|
||||
#define DWARF_FRAME_REGNUM(REG) DBX_REGISTER_NUMBER (REG)
|
||||
#endif
|
||||
|
||||
/* The offset from the incoming value of %sp to the top of the stack frame
|
||||
for the current function. */
|
||||
#ifndef INCOMING_FRAME_SP_OFFSET
|
||||
#define INCOMING_FRAME_SP_OFFSET 0
|
||||
#endif
|
||||
|
||||
/* Return a pointer to a copy of the section string name S with all
|
||||
attributes stripped off, and an asterisk prepended (for assemble_name). */
|
||||
|
||||
|
|
@ -519,15 +492,6 @@ reg_number (rtl)
|
|||
return regno;
|
||||
}
|
||||
|
||||
/* The current rule for calculating the DWARF2 canonical frame address. */
|
||||
static unsigned long cfa_reg;
|
||||
static long cfa_offset;
|
||||
|
||||
/* The register used for saving registers to the stack, and its offset
|
||||
from the CFA. */
|
||||
static unsigned cfa_store_reg;
|
||||
static long cfa_store_offset;
|
||||
|
||||
/* The running total of the size of arguments pushed onto the stack. */
|
||||
static long args_size;
|
||||
|
||||
|
|
@ -864,11 +828,6 @@ typedef struct limbo_die_struct
|
|||
}
|
||||
limbo_die_node;
|
||||
|
||||
/* How to start an assembler comment. */
|
||||
#ifndef ASM_COMMENT_START
|
||||
#define ASM_COMMENT_START ";#"
|
||||
#endif
|
||||
|
||||
/* Define a macro which returns non-zero for a TYPE_DECL which was
|
||||
implicitly generated for a tagged type.
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@
|
|||
|
||||
#if !( defined(_WIN32) && !defined(__CYGWIN__))
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Get the working directory. Use the PWD environment variable if it's
|
||||
set correctly, since this is faster and gives more uniform answers
|
||||
to the user. Yield the working directory if successful; otherwise,
|
||||
|
|
@ -54,6 +58,8 @@ getpwd ()
|
|||
|
||||
#else /* _WIN32 && !__CYGWIN__ */
|
||||
|
||||
#include <direct.h>
|
||||
|
||||
char *
|
||||
getpwd ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -67,13 +67,6 @@ Boston, MA 02111-1307, USA. */
|
|||
#include <time.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
/* Some systems define these in, e.g., param.h. We undefine these names
|
||||
here to avoid the warnings. We prefer to use our definitions since we
|
||||
know they are correct. */
|
||||
|
|
|
|||
137
gcc/tree.c
137
gcc/tree.c
|
|
@ -265,7 +265,6 @@ int (*lang_get_alias_set) (tree);
|
|||
#define TYPE_HASH(TYPE) ((unsigned long) (TYPE) & 0777777)
|
||||
|
||||
static void set_type_quals (tree, int);
|
||||
static void append_random_chars (char *);
|
||||
|
||||
extern char *mode_name[];
|
||||
|
||||
|
|
@ -4766,146 +4765,10 @@ dump_tree_statistics ()
|
|||
print_inline_obstack_statistics ();
|
||||
}
|
||||
|
||||
#define FILE_FUNCTION_PREFIX_LEN 9
|
||||
|
||||
#ifndef NO_DOLLAR_IN_LABEL
|
||||
#define FILE_FUNCTION_FORMAT "_GLOBAL_$%s$%s"
|
||||
#else /* NO_DOLLAR_IN_LABEL */
|
||||
#ifndef NO_DOT_IN_LABEL
|
||||
#define FILE_FUNCTION_FORMAT "_GLOBAL_.%s.%s"
|
||||
#else /* NO_DOT_IN_LABEL */
|
||||
#define FILE_FUNCTION_FORMAT "_GLOBAL__%s_%s"
|
||||
#endif /* NO_DOT_IN_LABEL */
|
||||
#endif /* NO_DOLLAR_IN_LABEL */
|
||||
|
||||
extern char * first_global_object_name;
|
||||
extern char * weak_global_object_name;
|
||||
|
||||
/* Appends 6 random characters to TEMPLATE to (hopefully) avoid name
|
||||
clashes in cases where we can't reliably choose a unique name.
|
||||
|
||||
Derived from mkstemp.c in libiberty. */
|
||||
|
||||
static void
|
||||
append_random_chars (template)
|
||||
char *template;
|
||||
{
|
||||
static const char letters[]
|
||||
= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||
static HOST_WIDE_UINT value;
|
||||
HOST_WIDE_UINT v;
|
||||
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
struct timeval tv;
|
||||
#endif
|
||||
|
||||
template += strlen (template);
|
||||
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
/* Get some more or less random data. */
|
||||
gettimeofday (&tv, NULL);
|
||||
value += ((HOST_WIDE_UINT) tv.tv_usec << 16) ^ tv.tv_sec ^ getpid ();
|
||||
#else
|
||||
value += getpid ();
|
||||
#endif
|
||||
|
||||
v = value;
|
||||
|
||||
/* Fill in the random bits. */
|
||||
template[0] = letters[v % 62];
|
||||
v /= 62;
|
||||
template[1] = letters[v % 62];
|
||||
v /= 62;
|
||||
template[2] = letters[v % 62];
|
||||
v /= 62;
|
||||
template[3] = letters[v % 62];
|
||||
v /= 62;
|
||||
template[4] = letters[v % 62];
|
||||
v /= 62;
|
||||
template[5] = letters[v % 62];
|
||||
|
||||
template[6] = '\0';
|
||||
}
|
||||
|
||||
/* Generate a name for a function unique to this translation unit.
|
||||
TYPE is some string to identify the purpose of this function to the
|
||||
linker or collect2. */
|
||||
|
||||
tree
|
||||
get_file_function_name_long (type)
|
||||
char *type;
|
||||
{
|
||||
char *buf;
|
||||
register char *p;
|
||||
|
||||
if (first_global_object_name)
|
||||
p = first_global_object_name;
|
||||
else
|
||||
{
|
||||
/* We don't have anything that we know to be unique to this translation
|
||||
unit, so use what we do have and throw in some randomness. */
|
||||
|
||||
char *name = weak_global_object_name;
|
||||
char *file = main_input_filename;
|
||||
|
||||
if (! name)
|
||||
name = "";
|
||||
if (! file)
|
||||
file = input_filename;
|
||||
|
||||
p = (char *) alloca (7 + strlen (name) + strlen (file));
|
||||
|
||||
sprintf (p, "%s%s", name, file);
|
||||
append_random_chars (p);
|
||||
}
|
||||
|
||||
buf = (char *) alloca (sizeof (FILE_FUNCTION_FORMAT) + strlen (p)
|
||||
+ strlen (type));
|
||||
|
||||
/* Set up the name of the file-level functions we may need. */
|
||||
/* Use a global object (which is already required to be unique over
|
||||
the program) rather than the file name (which imposes extra
|
||||
constraints). -- Raeburn@MIT.EDU, 10 Jan 1990. */
|
||||
sprintf (buf, FILE_FUNCTION_FORMAT, type, p);
|
||||
|
||||
/* Don't need to pull weird characters out of global names. */
|
||||
if (p != first_global_object_name)
|
||||
{
|
||||
for (p = buf+11; *p; p++)
|
||||
if (! ((*p >= '0' && *p <= '9')
|
||||
#if 0 /* we always want labels, which are valid C++ identifiers (+ `$') */
|
||||
#ifndef ASM_IDENTIFY_GCC /* this is required if `.' is invalid -- k. raeburn */
|
||||
|| *p == '.'
|
||||
#endif
|
||||
#endif
|
||||
#ifndef NO_DOLLAR_IN_LABEL /* this for `$'; unlikely, but... -- kr */
|
||||
|| *p == '$'
|
||||
#endif
|
||||
#ifndef NO_DOT_IN_LABEL /* this for `.'; unlikely, but... */
|
||||
|| *p == '.'
|
||||
#endif
|
||||
|| (*p >= 'A' && *p <= 'Z')
|
||||
|| (*p >= 'a' && *p <= 'z')))
|
||||
*p = '_';
|
||||
}
|
||||
|
||||
return get_identifier (buf);
|
||||
}
|
||||
|
||||
/* If KIND=='I', return a suitable global initializer (constructor) name.
|
||||
If KIND=='D', return a suitable global clean-up (destructor) name. */
|
||||
|
||||
tree
|
||||
get_file_function_name (kind)
|
||||
int kind;
|
||||
{
|
||||
char p[2];
|
||||
p[0] = kind;
|
||||
p[1] = 0;
|
||||
|
||||
return get_file_function_name_long (p);
|
||||
}
|
||||
|
||||
|
||||
/* Expand (the constant part of) a SET_TYPE CONSTRUCTOR node.
|
||||
The result is placed in BUFFER (which has length BIT_SIZE),
|
||||
|
|
|
|||
|
|
@ -1884,8 +1884,6 @@ extern void (*incomplete_decl_finalize_hook) (tree);
|
|||
|
||||
/* In tree.c */
|
||||
extern char *perm_calloc (int, long);
|
||||
extern tree get_file_function_name (int);
|
||||
extern tree get_file_function_name_long (char *);
|
||||
extern tree get_set_constructor_bits (tree, char *, int);
|
||||
extern tree get_set_constructor_bytes (tree,
|
||||
unsigned char *, int);
|
||||
|
|
@ -2074,7 +2072,6 @@ extern void preserve_momentary (void);
|
|||
extern void saveable_allocation (void);
|
||||
extern void temporary_allocation (void);
|
||||
extern void resume_temporary_allocation (void);
|
||||
extern tree get_file_function_name (int);
|
||||
extern void set_identifier_size (int);
|
||||
extern int int_fits_type_p (tree, tree);
|
||||
extern int tree_log2 (tree);
|
||||
|
|
@ -2240,11 +2237,6 @@ extern HOST_WIDE_INT all_cases_count (tree, int *);
|
|||
extern void check_for_full_enumeration_handling (tree);
|
||||
extern void declare_nonlocal_label (tree);
|
||||
|
||||
|
||||
/* If KIND=='I', return a suitable global initializer (constructor) name.
|
||||
If KIND=='D', return a suitable global clean-up (destructor) name. */
|
||||
extern tree get_file_function_name (int);
|
||||
|
||||
/* Interface of the DWARF2 unwind info support. */
|
||||
|
||||
/* Decide whether we want to emit frame unwind information for the current
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user