* config/i386/cygming.h (ASM_OUTPUT_EXTERNAL): Pass DECL to
i386_pe_record_external_function.
(i386_pe_record_external_function): Update declaration.
* config/i386/winnt.c (struct extern_list): Add decl field.
(i386_pe_record_external_function): Add decl parameter.
(i386_pe_file_end): Check TREE_ASM_WRITTEN on decl, not
identifier.
* config/i386/i386-protos.h (i386_pe_record_external_function):
Update declaration.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97602
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-04-05 Ian Lance Taylor <ian@airs.com>
+
+ PR debug/9963
+ * config/i386/cygming.h (ASM_OUTPUT_EXTERNAL): Pass DECL to
+ i386_pe_record_external_function.
+ (i386_pe_record_external_function): Update declaration.
+ * config/i386/winnt.c (struct extern_list): Add decl field.
+ (i386_pe_record_external_function): Add decl parameter.
+ (i386_pe_file_end): Check TREE_ASM_WRITTEN on decl, not
+ identifier.
+ * config/i386/i386-protos.h (i386_pe_record_external_function):
+ Update declaration.
+
2005-04-05 Kazu Hirata <kazu@cs.umass.edu>
* config/m68k/m68k-protos.h: Add a prototype for
do \
{ \
if (TREE_CODE (DECL) == FUNCTION_DECL) \
- i386_pe_record_external_function (NAME); \
+ i386_pe_record_external_function ((DECL), (NAME)); \
} \
while (0)
/* External function declarations. */
-extern void i386_pe_record_external_function (const char *);
+extern void i386_pe_record_external_function (tree, const char *);
extern void i386_pe_declare_function_type (FILE *, const char *, int);
extern void i386_pe_record_exported_symbol (const char *, int);
extern void i386_pe_file_end (void);
extern int i386_pe_dllimport_name_p (const char *);
extern void i386_pe_unique_section (tree, int);
extern void i386_pe_declare_function_type (FILE *, const char *, int);
-extern void i386_pe_record_external_function (const char *);
+extern void i386_pe_record_external_function (tree, const char *);
extern void i386_pe_record_exported_symbol (const char *, int);
extern void i386_pe_asm_file_end (FILE *);
extern void i386_pe_encode_section_info (tree, rtx, int);
struct extern_list GTY(())
{
struct extern_list *next;
+ tree decl;
const char *name;
};
for it then. */
void
-i386_pe_record_external_function (const char *name)
+i386_pe_record_external_function (tree decl, const char *name)
{
struct extern_list *p;
p = (struct extern_list *) ggc_alloc (sizeof *p);
p->next = extern_head;
+ p->decl = decl;
p->name = name;
extern_head = p;
}
{
tree decl;
- decl = get_identifier (p->name);
+ decl = p->decl;
/* Positively ensure only one declaration for any given symbol. */
- if (! TREE_ASM_WRITTEN (decl) && TREE_SYMBOL_REFERENCED (decl))
+ if (! TREE_ASM_WRITTEN (decl)
+ && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
{
TREE_ASM_WRITTEN (decl) = 1;
i386_pe_declare_function_type (asm_out_file, p->name,