From 9591058e9c2248b3c360ef7ce74a0ac256bcabd2 Mon Sep 17 00:00:00 2001 From: ian Date: Wed, 5 Dec 2012 06:14:17 +0000 Subject: [PATCH] * godump.c (find_dummy_types): Output a dummy type if we couldn't output the real type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194181 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/godump.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 32f7a86..b9a1b08 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-12-04 Ian Lance Taylor + + * godump.c (find_dummy_types): Output a dummy type if we couldn't + output the real type. + 2012-12-04 Steven Bosscher * rtl.h (print_insn_with_notes): Remove prototype. diff --git a/gcc/godump.c b/gcc/godump.c index 22995fe..c396ed5 100644 --- a/gcc/godump.c +++ b/gcc/godump.c @@ -1,5 +1,5 @@ /* Output Go language descriptions of types. - Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. + Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. Written by Ian Lance Taylor . This file is part of GCC. @@ -1164,9 +1164,11 @@ find_dummy_types (const void *ptr, void *adata) struct godump_container *data = (struct godump_container *) adata; const char *type = (const char *) ptr; void **slot; + void **islot; slot = htab_find_slot (data->type_hash, type, NO_INSERT); - if (slot == NULL) + islot = htab_find_slot (data->invalid_hash, type, NO_INSERT); + if (slot == NULL || islot != NULL) fprintf (go_dump_file, "type _%s struct {}\n", type); return true; } -- 2.7.4