aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2012-06-30 00:46:44 +0000
committerCary Coutant <ccoutant@gcc.gnu.org>2012-06-29 17:46:44 -0700
commit1ec205bf200fa9e34f7cff4082eb73ac62f2248e (patch)
tree61baa07a0a529299cf08fd9d77045d9e0faf8553 /gcc
parent9d006871a1a46fd222ba07596eb0a8e94fc3988e (diff)
downloadgcc-1ec205bf200fa9e34f7cff4082eb73ac62f2248e.zip
gcc-1ec205bf200fa9e34f7cff4082eb73ac62f2248e.tar.gz
gcc-1ec205bf200fa9e34f7cff4082eb73ac62f2248e.tar.bz2
dwarf2out.c (add_pubname_string): Don't check for want_pubnames.
2012-06-29 Cary Coutant <ccoutant@google.com> gcc/ * dwarf2out.c (add_pubname_string): Don't check for want_pubnames. (gen_subprogram_die): Don't add pubname if want_pubnames is false. (gen_variable_die): Likewise. (gen_namespace_die): Likewise. From-SVN: r189094
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/dwarf2out.c20
2 files changed, 17 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 45caa67..a6f4b34 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2012-06-29 Cary Coutant <ccoutant@google.com>
+
+ * dwarf2out.c (add_pubname_string): Don't check for want_pubnames.
+ (gen_subprogram_die): Don't add pubname if want_pubnames is false.
+ (gen_variable_die): Likewise.
+ (gen_namespace_die): Likewise.
+
2012-06-29 Eric Botcazou <ebotcazou@adacore.com>
* tree-eh.c (lower_try_finally_switch): Really put the location of the
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 832fbcd..08116b5 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -8152,14 +8152,11 @@ dwarf2_name (tree decl, int scope)
static void
add_pubname_string (const char *str, dw_die_ref die)
{
- if (want_pubnames ())
- {
- pubname_entry e;
+ pubname_entry e;
- e.die = die;
- e.name = xstrdup (str);
- VEC_safe_push (pubname_entry, gc, pubname_table, &e);
- }
+ e.die = die;
+ e.name = xstrdup (str);
+ VEC_safe_push (pubname_entry, gc, pubname_table, &e);
}
static void
@@ -17146,7 +17143,8 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
add_AT_lbl_id (seg_die, DW_AT_high_pc,
fde->dw_fde_second_end);
add_name_attribute (seg_die, name);
- add_pubname_string (name, seg_die);
+ if (want_pubnames ())
+ add_pubname_string (name, seg_die);
}
}
else
@@ -17571,7 +17569,8 @@ gen_variable_die (tree decl, tree origin, dw_die_ref context_die)
}
else if (DECL_EXTERNAL (decl))
add_AT_flag (com_die, DW_AT_declaration, 1);
- add_pubname_string (cnam, com_die); /* ??? needed? */
+ if (want_pubnames ())
+ add_pubname_string (cnam, com_die); /* ??? needed? */
com_die->decl_id = DECL_UID (com_decl);
slot = htab_find_slot (common_block_die_table, com_die, INSERT);
*slot = (void *) com_die;
@@ -19197,7 +19196,8 @@ gen_namespace_die (tree decl, dw_die_ref context_die)
equate_decl_number_to_die (decl, namespace_die);
}
/* Bypass dwarf2_name's check for DECL_NAMELESS. */
- add_pubname_string (lang_hooks.dwarf_name (decl, 1), namespace_die);
+ if (want_pubnames ())
+ add_pubname_string (lang_hooks.dwarf_name (decl, 1), namespace_die);
}
/* Generate Dwarf debug information for a decl described by DECL.