diff options
author | Sterling Augustine <saugustine@google.com> | 2012-01-06 21:39:11 +0000 |
---|---|---|
committer | Sterling Augustine <saugustine@google.com> | 2012-01-06 21:39:11 +0000 |
commit | e16d2b380b4a33e7ef908d4085b10dfc48753f30 (patch) | |
tree | 0bb891fc07210b35fd73b500bb0164e707af0ffa | |
parent | 2e6d8b267b9ce1a459926291fd74432862adca98 (diff) |
gcc/ChangeLog
2011-12-19 Sterling Augustine <saugustine@google.com>
* dwarf2out.c (DEBUG_PUBNAMES_SECTION_LABEL,
DEBUG_PUBTYPES_SECTION_LABEL): Define.
(debug_pubnames_section_label, debug_pubtypes_section_label):
Declare.
(is_namespace_die, is_class_die): New functions.
(add_enumerator_pubname): New function.
(add_pubname): Call is_namespace_die, is_cu_die, and is_class_die in
conditional.
(add_pubtype): Call is_namespace_die. Rework name calculation. Call
type_tag, lang_hooks.dwarf_name and add_enumerator_pubname.
(output_pubnames): Output debug_pubnames_section_label or
debug_pubtypes_section_label.
(base_type_die): Call add_pubtype.
(gen_namespace_die): Call add_pubname_string and lang_hooks.dwarf_name.
(dwarf2_out_init): Generate debug_pubnames_section_label and
debug_pubtypes_section_label.
(pubtypes_section_empty): New function.
(dwarf2_out_finish): Call add_AT_lineptr if pubnames or pubtypes is
non-empty. When dealing with pubnames, change assertion to conditional.
Move code checking for empty section to...
(output_pubnames): ...to here.
* target.def: Switch boolean to enable pubnames and pubtypes.
gcc/c-family/ChangeLog
2011-12-19 Sterling Augustine <saugustine@google.com>
* c-pretty-print.c (pp_c_specifier_qualifier_list): Move conditional
from beginning to end.
gcc/cp/ChangeLog
2011-12-19 Sterling Augustine <saugustine@google.com>
* error.c (dump_decl): Reformat return value to "(anonymous namespace)".
(lang_decl_name): Return "(anonymous namespace)" when appropriate.
gcc/include/ChangeLog
2011-12-19 Sterling Augustine <saugustine@google.com>
* dwarf2.h (enum dwarf_form): Add DW_FORM_GNU_ref_index,
DW_FORM_GNU_addr_index and DW_FORM_GNU_str_index.
(enum dwarf_attribute): Add DW_AT_GNU_dwo_name, DW_AT_GNU_dwo_id,
DW_AT_GNU_ref_base, DW_AT_GNU_addr_base, DW_AT_GNU_pubnames and
DW_AT_GNU_pubtypes.
gcc/testsuite/ChangeLog:
2012-01-04 Sterling Augustine <saugustine@google.com>
* gcc/testsuite/g++.dg/diagnostic/bindings1.C: Adjust expected output.
* gcc/testsuite/g++.dg/ext/pretty3.C: Likewise.
* gcc/testsuite/g++.dg/pr44486.C: Likewise.
* gcc/testsuite/g++.dg/warn/Wuninitializable-member.C: Likewise.
* gcc/testsuite/g++.dg/warn/pr35711.C: Likewise.
* gcc/testsuite/g++.old-deja/g++.pt/memtemp77.C: Likewise.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/google/gcc-4_6@182966 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.google-4_6 | 40 | ||||
-rw-r--r-- | gcc/c-family/ChangeLog.google-4_6 | 7 | ||||
-rw-r--r-- | gcc/c-family/c-pretty-print.c | 4 | ||||
-rw-r--r-- | gcc/cp/ChangeLog.google-4_6 | 7 | ||||
-rw-r--r-- | gcc/cp/error.c | 4 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 178 | ||||
-rw-r--r-- | gcc/target.def | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog.google-4_6 | 10 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/pretty3.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/pr44486.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/warn/Wuninitializable-member.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/warn/pr35711.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/memtemp77.C | 2 | ||||
-rw-r--r-- | include/ChangeLog.google-4_6 | 10 | ||||
-rw-r--r-- | include/dwarf2.h | 13 |
15 files changed, 215 insertions, 70 deletions
diff --git a/gcc/ChangeLog.google-4_6 b/gcc/ChangeLog.google-4_6 index 38d64aeec05..0dca00a52bd 100644 --- a/gcc/ChangeLog.google-4_6 +++ b/gcc/ChangeLog.google-4_6 @@ -1,8 +1,48 @@ +2012-01-04 Sterling Augustine <saugustine@google.com> + + Backport from google/main + + * dwarf2out.c (add_pubname): Move conditional clause from outer to + inner if-statement. + (dwarf2out_finish): Fix conditions to output DW_AT_GNU_pubnames and + DW_AT_GNU_pubtypes. Move decision to output pubnames and pubtypes from + here... + (output_pubnames): ...to here. + (pubtypes_section_empty): Delete unused function. + 2012-01-02 Dehao Chen <dehao@google.com> * ipa-inline.c (cgraph_node_opt_info): Print more concise info when dumping inline decisions. +2011-12-19 Sterling Augustine <saugustine@google.com> + + Backport from google/main + + * dwarf2out.c (DEBUG_PUBNAMES_SECTION_LABEL, + DEBUG_PUBTYPES_SECTION_LABEL): Define. + (debug_pubnames_section_label, debug_pubtypes_section_label): + Declare. + (is_namespace_die, is_class_die): New functions. + (add_enumerator_pubname): New function. + (add_pubname): Call is_namespace_die, is_cu_die, and is_class_die in + conditional. + (add_pubtype): Call is_namespace_die. Rework name calculation. Call + type_tag, lang_hooks.dwarf_name and add_enumerator_pubname. + (output_pubnames): Output debug_pubnames_section_label or + debug_pubtypes_section_label. + (base_type_die): Call add_pubtype. + (gen_namespace_die): Call add_pubname_string and lang_hooks.dwarf_name. + (dwarf2_out_init): Generate debug_pubnames_section_label and + debug_pubtypes_section_label. + (pubtypes_section_empty): New function. + (dwarf2_out_finish): Call add_AT_lineptr if pubnames or pubtypes is + non-empty. When dealing with pubnames, change assertion to conditional. + Call pubtypes_section_empty. Likewise when dealing with pubtypes. + Move code checking for empty section to... + (pubtypes_section_empty): Here. + * target.def: Switch boolean to enable pubnames and pubtypes. + 2011-12-17 Sriraman Tallam <tmsriram@google.com> * mversn-dispatch.c (make_name): Use '.' to concatenate to suffix diff --git a/gcc/c-family/ChangeLog.google-4_6 b/gcc/c-family/ChangeLog.google-4_6 index a1776941f13..23679871f9a 100644 --- a/gcc/c-family/ChangeLog.google-4_6 +++ b/gcc/c-family/ChangeLog.google-4_6 @@ -1,3 +1,10 @@ +2011-12-19 Sterling Augustine <saugustine@google.com> + + Backport from google/main + + * c-pretty-print.c (pp_c_specifier_qualifier_list): Move conditional + from beginning to end. + 2011-12-06 Jeffrey Yasskin <jyasskin@google.com> Backport from rev 180707 diff --git a/gcc/c-family/c-pretty-print.c b/gcc/c-family/c-pretty-print.c index 74b897a8500..278927c9572 100644 --- a/gcc/c-family/c-pretty-print.c +++ b/gcc/c-family/c-pretty-print.c @@ -445,8 +445,6 @@ pp_c_specifier_qualifier_list (c_pretty_printer *pp, tree t) { const enum tree_code code = TREE_CODE (t); - if (TREE_CODE (t) != POINTER_TYPE) - pp_c_type_qualifier_list (pp, t); switch (code) { case REFERENCE_TYPE: @@ -491,6 +489,8 @@ pp_c_specifier_qualifier_list (c_pretty_printer *pp, tree t) pp_simple_type_specifier (pp, t); break; } + if (TREE_CODE (t) != POINTER_TYPE) + pp_c_type_qualifier_list (pp, t); } /* parameter-type-list: diff --git a/gcc/cp/ChangeLog.google-4_6 b/gcc/cp/ChangeLog.google-4_6 index 363c4b7d75e..0137c1ba627 100644 --- a/gcc/cp/ChangeLog.google-4_6 +++ b/gcc/cp/ChangeLog.google-4_6 @@ -1,3 +1,10 @@ +2011-12-19 Sterling Augustine <saugustine@google.com> + + Backport from google/main + + * error.c (dump_decl): Reformat return value to "(anonymous namespace)". + (lang_decl_name): Return "(anonymous namespace)" when appropriate. + 2011-12-17 Easwaran Raman <eraman@google.com> Backport r182443 from google/main. diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 65fe3285d56..809c87c50ac 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -974,7 +974,7 @@ dump_decl (tree t, int flags) dump_scope (CP_DECL_CONTEXT (t), flags); flags &= ~TFF_UNQUALIFIED_NAME; if (DECL_NAME (t) == NULL_TREE) - pp_cxx_ws_string (cxx_pp, M_("{anonymous}")); + pp_cxx_ws_string (cxx_pp, M_("(anonymous namespace)")); else pp_cxx_tree_identifier (cxx_pp, DECL_NAME (t)); } @@ -2494,6 +2494,8 @@ lang_decl_name (tree decl, int v, bool translate) if (TREE_CODE (decl) == FUNCTION_DECL) dump_function_name (decl, TFF_PLAIN_IDENTIFIER); + else if (DECL_NAME (decl) == NULL && TREE_CODE (decl) == NAMESPACE_DECL) + pp_string (cxx_pp, M_("(anonymous namespace)")); else dump_decl (DECL_NAME (decl), TFF_PLAIN_IDENTIFIER); diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 059a5588553..63ec7a0a47e 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -6413,6 +6413,7 @@ static void output_comp_unit (dw_die_ref, int); static void output_comdat_type_unit (comdat_type_node *); static const char *dwarf2_name (tree, int); static void add_pubname (tree, dw_die_ref); +static void add_enumerator_pubname (const char *, const char *, dw_die_ref); static void add_pubname_string (const char *, dw_die_ref); static void add_pubtype (tree, dw_die_ref); static void output_pubnames (VEC (pubname_entry,gc) *); @@ -6617,6 +6618,12 @@ static void gen_scheduled_generic_parms_dies (void); #ifndef COLD_TEXT_SECTION_LABEL #define COLD_TEXT_SECTION_LABEL "Ltext_cold" #endif +#ifndef DEBUG_PUBNAMES_SECTION_LABEL +#define DEBUG_PUBNAMES_SECTION_LABEL "Ldebug_pubnames" +#endif +#ifndef DEBUG_PUBTYPES_SECTION_LABEL +#define DEBUG_PUBTYPES_SECTION_LABEL "Ldebug_pubtypes" +#endif #ifndef DEBUG_LINE_SECTION_LABEL #define DEBUG_LINE_SECTION_LABEL "Ldebug_line" #endif @@ -6650,6 +6657,8 @@ static char cold_end_label[MAX_ARTIFICIAL_LABEL_BYTES]; static char abbrev_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; static char debug_info_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; static char debug_line_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; +static char debug_pubnames_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; +static char debug_pubtypes_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; static char macinfo_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; static char loc_section_label[MAX_ARTIFICIAL_LABEL_BYTES]; static char ranges_section_label[2 * MAX_ARTIFICIAL_LABEL_BYTES]; @@ -9763,6 +9772,22 @@ is_cu_die (dw_die_ref c) return c && c->die_tag == DW_TAG_compile_unit; } +/* Returns true iff C is a namespace DIE. */ + +static inline bool +is_namespace_die (dw_die_ref c) +{ + return c && c->die_tag == DW_TAG_namespace; +} + +/* Returns true iff C is a class DIE. */ + +static inline bool +is_class_die (dw_die_ref c) +{ + return c && c->die_tag == DW_TAG_class_type; +} + static char * gen_internal_sym (const char *prefix) { @@ -11634,16 +11659,35 @@ add_pubname_string (const char *str, dw_die_ref die) static void add_pubname (tree decl, dw_die_ref die) { - if (!GENERATE_MINIMUM_LINE_TABLE - && targetm.want_debug_pub_sections - && TREE_PUBLIC (decl)) + if (!GENERATE_MINIMUM_LINE_TABLE && targetm.want_debug_pub_sections) { - const char *name = dwarf2_name (decl, 1); - if (name) - add_pubname_string (name, die); + if ((TREE_PUBLIC (decl) && !is_class_die (die->die_parent)) + || is_cu_die (die->die_parent) || is_namespace_die (die->die_parent)) + { + const char *name = dwarf2_name (decl, 1); + if (name) + add_pubname_string (name, die); + } } } +/* Add an enumerator to the pubnames section. */ + +static void +add_enumerator_pubname (const char *scope_name, const char *sep, dw_die_ref die) +{ + const char *name; + pubname_entry e; + + if (scope_name) + name = concat (scope_name, sep, get_AT_string (die, DW_AT_name), NULL); + else + name = xstrdup (get_AT_string (die, DW_AT_name)); + e.name = name; + e.die = die; + VEC_safe_push (pubname_entry, gc, pubtype_table, &e); +} + /* Add a new entry to .debug_pubtypes if appropriate. */ static void @@ -11656,34 +11700,47 @@ add_pubtype (tree decl, dw_die_ref die) e.name = NULL; if ((TREE_PUBLIC (decl) - || is_cu_die (die->die_parent)) + || is_cu_die (die->die_parent) || is_namespace_die (die->die_parent)) && (die->die_tag == DW_TAG_typedef || COMPLETE_TYPE_P (decl))) { - e.die = die; + tree scope = NULL; + const char *scope_name = NULL; + const char *sep = is_cxx () ? "::" : "."; + const char *name = NULL; + if (TYPE_P (decl)) - { - if (TYPE_NAME (decl)) - { - if (TREE_CODE (TYPE_NAME (decl)) == IDENTIFIER_NODE) - e.name = IDENTIFIER_POINTER (TYPE_NAME (decl)); - else if (TREE_CODE (TYPE_NAME (decl)) == TYPE_DECL - && DECL_NAME (TYPE_NAME (decl))) - e.name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (decl))); - else - e.name = xstrdup ((const char *) get_AT_string (die, DW_AT_name)); - } - } + name = type_tag (decl); else - { - e.name = dwarf2_name (decl, 1); - if (e.name) - e.name = xstrdup (e.name); - } + name = lang_hooks.dwarf_name (decl, 1); /* If we don't have a name for the type, there's no point in adding it to the table. */ - if (e.name && e.name[0] != '\0') - VEC_safe_push (pubname_entry, gc, pubtype_table, &e); + if (name == NULL || name[0] == '\0') + return; + + e.die = die; + e.name = xstrdup (name); + + scope = TYPE_P (decl) ? TYPE_CONTEXT (decl) : NULL; + if (scope && TREE_CODE (scope) == NAMESPACE_DECL) + { + scope_name = lang_hooks.dwarf_name (scope, 1); + if (scope_name != NULL) + e.name = concat (scope_name, sep, e.name, NULL); + } + VEC_safe_push (pubname_entry, gc, pubtype_table, &e); + + /* Although it might be more consistent to add the pubinfo for the + enumerators as their dies are created, they should only be added if the + enum type meets the criteria above. So rather than re-check the parent + enum type whenever an enumerator die is created, just output them all + here. */ + if (die->die_tag == DW_TAG_enumeration_type) + { + dw_die_ref c; + + FOR_EACH_CHILD (die, c, add_enumerator_pubname (scope_name, sep, c)); + } } } @@ -11697,6 +11754,18 @@ output_pubnames (VEC (pubname_entry, gc) * names) unsigned long pubnames_length = size_of_pubnames (names); pubname_ref pub; + if (!targetm.want_debug_pub_sections || !info_section_emitted) + return; + if (names == pubname_table) + { + switch_to_section (debug_pubnames_section); + ASM_OUTPUT_LABEL (asm_out_file, debug_pubnames_section_label); + } + else + { + switch_to_section (debug_pubtypes_section); + ASM_OUTPUT_LABEL (asm_out_file, debug_pubtypes_section_label); + } if (DWARF_INITIAL_LENGTH_SIZE - DWARF_OFFSET_SIZE == 4) dw2_asm_output_data (4, 0xffffffff, "Initial length escape value indicating 64-bit DWARF extension"); @@ -12834,6 +12903,7 @@ base_type_die (tree type) add_AT_unsigned (base_type_result, DW_AT_byte_size, int_size_in_bytes (type)); add_AT_unsigned (base_type_result, DW_AT_encoding, encoding); + add_pubtype (type, base_type_result); return base_type_result; } @@ -21132,6 +21202,8 @@ gen_namespace_die (tree decl, dw_die_ref context_die) add_AT_die_ref (namespace_die, DW_AT_import, origin_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); } /* Generate Dwarf debug information for a decl described by DECL. @@ -22464,6 +22536,10 @@ dwarf2out_init (const char *filename ATTRIBUTE_UNUSED) ASM_GENERATE_INTERNAL_LABEL (debug_info_section_label, DEBUG_INFO_SECTION_LABEL, 0); + ASM_GENERATE_INTERNAL_LABEL (debug_pubnames_section_label, + DEBUG_PUBNAMES_SECTION_LABEL, 0); + ASM_GENERATE_INTERNAL_LABEL (debug_pubtypes_section_label, + DEBUG_PUBTYPES_SECTION_LABEL, 0); ASM_GENERATE_INTERNAL_LABEL (debug_line_section_label, DEBUG_LINE_SECTION_LABEL, 0); ASM_GENERATE_INTERNAL_LABEL (ranges_section_label, @@ -23480,6 +23556,7 @@ optimize_location_lists (dw_die_ref die) htab_delete (htab); } + /* Output stuff that dwarf requires at the end of every file, and generate the DWARF-2 debugging info. */ @@ -23720,6 +23797,17 @@ dwarf2out_finish (const char *filename) } htab_delete (comdat_type_table); + /* Add the DW_AT_GNU_pubnames and DW_AT_GNU_pubtypes attributes. */ + if (targetm.want_debug_pub_sections) + { + /* FIXME: Should use add_AT_pubnamesptr. This works because most targets + don't care what the base section is. */ + add_AT_lineptr (comp_unit_die (), DW_AT_GNU_pubnames, + debug_pubnames_section_label); + add_AT_lineptr (comp_unit_die (), DW_AT_GNU_pubtypes, + debug_pubtypes_section_label); + } + /* Output the main compilation unit if non-empty or if .debug_macinfo will be emitted. */ output_comp_unit (comp_unit_die (), debug_info_level >= DINFO_LEVEL_VERBOSE); @@ -23740,42 +23828,12 @@ dwarf2out_finish (const char *filename) output_location_lists (comp_unit_die ()); } - /* Output public names table if necessary. */ - if (!VEC_empty (pubname_entry, pubname_table)) - { - gcc_assert (info_section_emitted); - switch_to_section (debug_pubnames_section); - output_pubnames (pubname_table); - } - - /* Output public types table if necessary. */ + /* Output public names and types tables if necessary. */ + output_pubnames (pubname_table); /* ??? Only defined by DWARF3, but emitted by Darwin for DWARF2. It shouldn't hurt to emit it always, since pure DWARF2 consumers simply won't look for the section. */ - if (!VEC_empty (pubname_entry, pubtype_table)) - { - bool empty = false; - - if (flag_eliminate_unused_debug_types) - { - /* The pubtypes table might be emptied by pruning unused items. */ - unsigned i; - pubname_ref p; - empty = true; - FOR_EACH_VEC_ELT (pubname_entry, pubtype_table, i, p) - if (p->die->die_offset != 0) - { - empty = false; - break; - } - } - if (!empty) - { - gcc_assert (info_section_emitted); - switch_to_section (debug_pubtypes_section); - output_pubnames (pubtype_table); - } - } + output_pubnames (pubtype_table); /* Output direct and virtual call tables if necessary. */ if (!VEC_empty (dcall_entry, dcall_table)) diff --git a/gcc/target.def b/gcc/target.def index 4dbe7392acd..756caf3b012 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -2795,7 +2795,7 @@ DEFHOOKPOD "True if the @code{.debug_pubtypes} and @code{.debug_pubnames} sections\ should be emitted. These sections are not used on most platforms, and\ in particular GDB does not use them.", - bool, false) + bool, true) DEFHOOKPOD (delay_sched2, "True if sched2 is not to be run at its normal place. \ diff --git a/gcc/testsuite/ChangeLog.google-4_6 b/gcc/testsuite/ChangeLog.google-4_6 index b781ad30f87..bf7f791f19c 100644 --- a/gcc/testsuite/ChangeLog.google-4_6 +++ b/gcc/testsuite/ChangeLog.google-4_6 @@ -1,3 +1,13 @@ +2012-01-04 Sterling Augustine <saugustine@google.com> + + Backport r182443 from google/main. + + * g++.dg/ext/pretty3.C: Likewise. + * g++.dg/pr44486.C: Likewise. + * g++.dg/warn/Wuninitializable-member.C: Likewise. + * g++.dg/warn/pr35711.C: Likewise. + * g++.old-deja/g++.pt/memtemp77.C: Likewise. + 2011-12-17 Easwaran Raman <eraman@google.com> Backport r182443 from google/main. diff --git a/gcc/testsuite/g++.dg/ext/pretty3.C b/gcc/testsuite/g++.dg/ext/pretty3.C index 01b14579af2..e59d77e1ee0 100644 --- a/gcc/testsuite/g++.dg/ext/pretty3.C +++ b/gcc/testsuite/g++.dg/ext/pretty3.C @@ -16,4 +16,4 @@ int main () { printf ("%s\n", D<int>().foo (0)); } -// { dg-final { scan-assembler "const char\\* D<U>::foo\\(typename B<U>::X\\)" } } +// { dg-final { scan-assembler "char const\\* D<U>::foo\\(typename B<U>::X\\)" } } diff --git a/gcc/testsuite/g++.dg/pr44486.C b/gcc/testsuite/g++.dg/pr44486.C index 01e84289f0b..1a23d57b587 100644 --- a/gcc/testsuite/g++.dg/pr44486.C +++ b/gcc/testsuite/g++.dg/pr44486.C @@ -7,4 +7,4 @@ namespace { S f() { const char * s = __PRETTY_FUNCTION__; return S(); } } int main() { f(); } -// { dg-final { scan-assembler "S \{anonymous\}::f" } } +// { dg-final { scan-assembler "S \\(anonymous namespace\\)::f" } } diff --git a/gcc/testsuite/g++.dg/warn/Wuninitializable-member.C b/gcc/testsuite/g++.dg/warn/Wuninitializable-member.C index 1c37e3ea023..9d889e1d694 100644 --- a/gcc/testsuite/g++.dg/warn/Wuninitializable-member.C +++ b/gcc/testsuite/g++.dg/warn/Wuninitializable-member.C @@ -8,7 +8,7 @@ public: }; class Y { - const int var;// { dg-warning "non-static const member 'const int Y::var' in class without a constructor" } + const int var;// { dg-warning "non-static const member 'int const Y::var' in class without a constructor" } public: int g(){ return 2*var; } }; diff --git a/gcc/testsuite/g++.dg/warn/pr35711.C b/gcc/testsuite/g++.dg/warn/pr35711.C index 653269c0e79..7c1be1c4e94 100644 --- a/gcc/testsuite/g++.dg/warn/pr35711.C +++ b/gcc/testsuite/g++.dg/warn/pr35711.C @@ -4,5 +4,5 @@ int* foo (volatile int *p) { - return (int*)p; // { dg-warning "cast from type 'volatile int\\*' to type 'int\\*' casts away qualifiers" } + return (int*)p; // { dg-warning "cast from type 'int volatile\\*' to type 'int\\*' casts away qualifiers" } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp77.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp77.C index e3ca5298d4f..2839e3b7f9d 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/memtemp77.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp77.C @@ -19,7 +19,7 @@ const char* S3<char>::h(int) { return __PRETTY_FUNCTION__; } int main() { if (strcmp (S3<double>::h(7), - "static const char* S3<T>::h(U) [with U = int, T = double]") == 0) + "static char const* S3<T>::h(U) [with U = int, T = double]") == 0) return 0; else return 1; diff --git a/include/ChangeLog.google-4_6 b/include/ChangeLog.google-4_6 index a77b2718a3c..18d0cf61721 100644 --- a/include/ChangeLog.google-4_6 +++ b/include/ChangeLog.google-4_6 @@ -1,3 +1,13 @@ +2011-12-19 Sterling Augustine <saugustine@google.com> + + Backport from google/main + + * dwarf2.h (enum dwarf_form): Add DW_FORM_GNU_ref_index, + DW_FORM_GNU_addr_index and DW_FORM_GNU_str_index. + (enum dwarf_attribute): Add DW_AT_GNU_dwo_name, DW_AT_GNU_dwo_id, + DW_AT_GNU_ref_base, DW_AT_GNU_addr_base, DW_AT_GNU_pubnames and + DW_AT_GNU_pubtypes. + 2011-09-27 Sriraman Tallam <tmsriram@google.com> * plugin-api.h diff --git a/include/dwarf2.h b/include/dwarf2.h index 7d3f5e49f86..0a5e2c96c95 100644 --- a/include/dwarf2.h +++ b/include/dwarf2.h @@ -182,8 +182,12 @@ enum dwarf_form DW_FORM_sec_offset = 0x17, DW_FORM_exprloc = 0x18, DW_FORM_flag_present = 0x19, - DW_FORM_ref_sig8 = 0x20 + DW_FORM_ref_sig8 = 0x20, #define DW_FORM_sig8 DW_FORM_ref_sig8 /* Note: The use of DW_FORM_sig8 is deprecated. */ + /* Extensions for Fission. */ + DW_FORM_GNU_ref_index = 0x70, + DW_FORM_GNU_addr_index = 0x71, + DW_FORM_GNU_str_index = 0x72 }; /* Attribute names and codes. */ @@ -351,6 +355,13 @@ enum dwarf_attribute /* Template template argument name. See http://gcc.gnu.org/wiki/TemplateParmsDwarf . */ DW_AT_GNU_template_name = 0x2110, + /* Extensions for Fission. */ + DW_AT_GNU_dwo_name = 0x2130, + DW_AT_GNU_dwo_id = 0x2131, + DW_AT_GNU_ref_base = 0x2132, + DW_AT_GNU_addr_base = 0x2133, + DW_AT_GNU_pubnames = 0x2134, + DW_AT_GNU_pubtypes = 0x2135, /* VMS extensions. */ DW_AT_VMS_rtnbeg_pd_address = 0x2201, /* GNAT extensions. */ |