diff options
author | Mark Mitchell <mark@codesourcery.com> | 2004-12-20 02:08:57 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2004-12-20 02:08:57 +0000 |
commit | 57829bc4f05c1087e005bc68adca4a0236f7e115 (patch) | |
tree | 6a891da2171d58c01e8dad91fed721c57e1daab7 /gcc/varasm.c | |
parent | 49a1b20cb3cc550523866f263da2613872aaa183 (diff) | |
download | gcc-57829bc4f05c1087e005bc68adca4a0236f7e115.zip gcc-57829bc4f05c1087e005bc68adca4a0236f7e115.tar.gz gcc-57829bc4f05c1087e005bc68adca4a0236f7e115.tar.bz2 |
defaults.h (ASM_OUTPUT_INTERNAL_LABEL): New macro.
* defaults.h (ASM_OUTPUT_INTERNAL_LABEL): New macro.
* output.h (assemble_name_raw): Declare it.
* system.h (ASM_OUTPUT_INTERNAL_LABEL): Do not poison it.
* varasm.c (assemble_name_raw): New function.
(assemble_name): Use it.
(default_internal_label): Likewise.
* config/darwin.c (darwin_asm_output_dwarf_delta): Likewise.
* doc/tm.texi (ASM_OUTPUT_INTERNAL_LABEL): Document.
From-SVN: r92401
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index e6d018c..79503d1 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1889,11 +1889,24 @@ mark_decl_referenced (tree decl) which do not need to be marked. */ } -/* Output to FILE a reference to the assembler name of a C-level name NAME. - If NAME starts with a *, the rest of NAME is output verbatim. - Otherwise NAME is transformed in an implementation-defined way - (usually by the addition of an underscore). - Many macros in the tm file are defined to call this function. */ +/* Output to FILE (an assembly file) a reference to NAME. If NAME + starts with a *, the rest of NAME is output verbatim. Otherwise + NAME is transformed in a target-specific way (usually by the + addition of an underscore). */ + +void +assemble_name_raw (FILE *file, const char *name) +{ + if (name[0] == '*') + fputs (&name[1], file); + else + ASM_OUTPUT_LABELREF (file, name); +} + +/* Like assemble_name_raw, but should be used when NAME might refer to + an entity that is also represented as a tree (like a function or + variable). If NAME does refer to such an entity, that entity will + be marked as referenced. */ void assemble_name (FILE *file, const char *name) @@ -1907,10 +1920,7 @@ assemble_name (FILE *file, const char *name) if (id) mark_referenced (id); - if (name[0] == '*') - fputs (&name[1], file); - else - ASM_OUTPUT_LABELREF (file, name); + assemble_name_raw (file, name); } /* Allocate SIZE bytes writable static space with a gensym name @@ -5204,7 +5214,7 @@ default_internal_label (FILE *stream, const char *prefix, { char *const buf = alloca (40 + strlen (prefix)); ASM_GENERATE_INTERNAL_LABEL (buf, prefix, labelno); - ASM_OUTPUT_LABEL (stream, buf); + ASM_OUTPUT_INTERNAL_LABEL (stream, buf); } /* This is the default behavior at the beginning of a file. It's |