diff options
author | Geoffrey Keating <geoffk@apple.com> | 2007-10-09 22:56:58 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2007-10-09 22:56:58 +0000 |
commit | c3b07ec29f81ef3c0a392c5989ae825b2f7c8195 (patch) | |
tree | 33144a308be03d23ddc724e1545cbf9cd9ddc413 /gcc/config/darwin.c | |
parent | 32e26ecee6887e1a07a4208d96fe43718ae860bc (diff) | |
download | gcc-c3b07ec29f81ef3c0a392c5989ae825b2f7c8195.zip gcc-c3b07ec29f81ef3c0a392c5989ae825b2f7c8195.tar.gz gcc-c3b07ec29f81ef3c0a392c5989ae825b2f7c8195.tar.bz2 |
Index: gcc/ChangeLog
2007-10-09 Geoffrey Keating <geoffk@apple.com>
* dwarf2out.c (output_call_frame_info): FDEs are always emitted
if flag_exceptions is not set.
* config/darwin.c (darwin_emit_unwind_label): Rewrite to use
assemble_name rather than incorrectly emulating it.
Index: gcc/testsuite/ChangeLog
2007-10-09 Geoffrey Keating <geoffk@apple.com>
* gcc.dg/unwind-1.c: New.
From-SVN: r129187
Diffstat (limited to 'gcc/config/darwin.c')
-rw-r--r-- | gcc/config/darwin.c | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index d251474..66d1ab0 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -1465,12 +1465,6 @@ darwin_handle_weak_import_attribute (tree *node, tree name, return NULL_TREE; } -static void -no_dead_strip (FILE *file, const char *lab) -{ - fprintf (file, ".no_dead_strip %s\n", lab); -} - /* Emit a label for an FDE, making it global and/or weak if appropriate. The third parameter is nonzero if this is for exception handling. The fourth parameter is nonzero if this is just a placeholder for an @@ -1479,46 +1473,44 @@ no_dead_strip (FILE *file, const char *lab) void darwin_emit_unwind_label (FILE *file, tree decl, int for_eh, int empty) { - const char *base; char *lab; - bool need_quotes; - - if (DECL_ASSEMBLER_NAME_SET_P (decl)) - base = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); - else - base = IDENTIFIER_POINTER (DECL_NAME (decl)); - - base = targetm.strip_name_encoding (base); - need_quotes = name_needs_quotes (base); if (! for_eh) return; - lab = concat (need_quotes ? "\"" : "", user_label_prefix, base, ".eh", - need_quotes ? "\"" : "", NULL); + lab = concat (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)), ".eh", NULL); if (TREE_PUBLIC (decl)) - fprintf (file, "\t%s %s\n", - (DECL_VISIBILITY (decl) != VISIBILITY_HIDDEN - ? ".globl" - : ".private_extern"), - lab); + { + targetm.asm_out.globalize_label (file, lab); + if (DECL_VISIBILITY (decl) == VISIBILITY_HIDDEN) + { + fputs ("\t.private_extern ", file); + assemble_name (file, lab); + fputc ('\n', file); + } + } if (DECL_WEAK (decl)) - fprintf (file, "\t.weak_definition %s\n", lab); + { + fputs ("\t.weak_definition ", file); + assemble_name (file, lab); + fputc ('\n', file); + } + assemble_name (file, lab); if (empty) { - fprintf (file, "%s = 0\n", lab); + fputs (" = 0\n", file); /* Mark the absolute .eh and .eh1 style labels as needed to ensure that we don't dead code strip them and keep such labels from another instantiation point until we can fix this properly with group comdat support. */ - no_dead_strip (file, lab); + darwin_mark_decl_preserved (lab); } else - fprintf (file, "%s:\n", lab); + fputs (":\n", file); free (lab); } |