From e599ac2befed1db5ce12c92dd8ba0099175c8bd5 Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Tue, 11 Sep 2007 01:38:40 +0000 Subject: [PATCH] cygming.h (TARGET_STRIP_NAME_ENCODING): Don't override default. * config/i386/cygming.h (TARGET_STRIP_NAME_ENCODING): Don't override default. * config/i386/i386.c (get_dllimport_decl): Don't strip FASTCALL_PREFIX. From-SVN: r128362 --- gcc/ChangeLog | 7 +++++++ gcc/config/i386/cygming.h | 2 -- gcc/config/i386/i386.c | 9 +-------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2ed812ce9b5..e55071362f7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2007-09-11 Danny Smith + + * config/i386/cygming.h (TARGET_STRIP_NAME_ENCODING): Don't + override default. + * config/i386/i386.c (get_dllimport_decl): Don't strip + FASTCALL_PREFIX. + 2007-09-10 Janis Johnson PR c/30013 diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h index d0968e3c534..6b1c13652df 100644 --- a/gcc/config/i386/cygming.h +++ b/gcc/config/i386/cygming.h @@ -183,8 +183,6 @@ do { \ Note that we can be called twice on the same decl. */ #define SUBTARGET_ENCODE_SECTION_INFO i386_pe_encode_section_info -#undef TARGET_STRIP_NAME_ENCODING -#define TARGET_STRIP_NAME_ENCODING i386_pe_strip_name_encoding_full /* Output a common block. */ #undef ASM_OUTPUT_ALIGNED_DECL_COMMON diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index ce7c19b46ec..57fb628a489 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -7820,14 +7820,7 @@ get_dllimport_decl (tree decl) name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); name = targetm.strip_name_encoding (name); - if (name[0] == FASTCALL_PREFIX) - { - name++; - prefix = "*__imp_"; - } - else - prefix = "*__imp__"; - + prefix = name[0] == FASTCALL_PREFIX ? "*__imp_": "*__imp__"; namelen = strlen (name); prefixlen = strlen (prefix); imp_name = (char *) alloca (namelen + prefixlen + 1);