diff options
author | Richard Stallman <rms@gnu.org> | 1993-02-25 00:25:44 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-02-25 00:25:44 +0000 |
commit | db0751e4ba929051b417b50a80704678e3f2e3c4 (patch) | |
tree | c41806e4c5b61c8e9fc2627ba94be1c5f14c9781 /gcc | |
parent | 903da7659535bb088b58905c7c0a673e8219af12 (diff) | |
download | gcc-db0751e4ba929051b417b50a80704678e3f2e3c4.zip gcc-db0751e4ba929051b417b50a80704678e3f2e3c4.tar.gz gcc-db0751e4ba929051b417b50a80704678e3f2e3c4.tar.bz2 |
(vms_check_external): New function.
From-SVN: r3527
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/vax/vax.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c index 14f98e4..bd63746 100644 --- a/gcc/config/vax/vax.c +++ b/gcc/config/vax/vax.c @@ -578,6 +578,35 @@ vax_rtx_cost (x) return c; } +/* Linked list of all externals that are to be emitted when optimizing + for the global pointer if they haven't been declared by the end of + the program with an appropriate .comm or initialization. */ + +struct extern_list { + struct extern_list *next; /* next external */ + char *name; /* name of the external */ +} *extern_head = 0; + +/* Return 1 if NAME has already had an external definition; + 0 if it has not (so caller should output one). */ + +int +vms_check_external (name) + char *name; +{ + register struct extern_list *p; + + for (p = extern_head; p; p = p->next) + if (!strcmp (p->name, name)) + return 1; + + p = (struct extern_list *)permalloc ((long) sizeof (struct extern_list)); + p->next = extern_head; + p->name = name; + extern_head = p; + return 0; +} + #ifdef VMS /* Additional support code for VMS. */ |