summaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@apple.com>2006-04-18 21:52:49 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2006-04-18 21:52:49 +0000
commit76f7a74ff6e0603026f74c23559b8b9fae209a10 (patch)
tree6590550e90bd5fdee99aa5e0bfbc7f208095fa56 /gcc/dwarf2out.c
parent49721058b7e6479d58affffaaaabc8781ab1b1a7 (diff)
downloadgcc-76f7a74ff6e0603026f74c23559b8b9fae209a10.tar.gz
dwarf2out.c (prune_unused_types_update_strings): Don't add strings to hash table twice when the debug_str section has SECTION_MERGE.
* dwarf2out.c (prune_unused_types_update_strings): Don't add strings to hash table twice when the debug_str section has SECTION_MERGE. From-SVN: r113057
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 818ddb8f671..db07bb81b30 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -13998,9 +13998,8 @@ prune_unused_types_update_strings (dw_die_ref die)
s->refcount++;
/* Avoid unnecessarily putting strings that are used less than
twice in the hash table. */
- if (s->refcount == 2
- || (s->refcount == 1
- && (debug_str_section->common.flags & SECTION_MERGE) != 0))
+ if (s->refcount
+ == ((DEBUG_STR_SECTION_FLAGS & SECTION_MERGE) ? 1 : 2))
{
void ** slot;
slot = htab_find_slot_with_hash (debug_str_hash, s->str,