diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2015-06-17 15:36:02 +0000 |
---|---|---|
committer | Andrew Macleod <amacleod@gcc.gnu.org> | 2015-06-17 15:36:02 +0000 |
commit | ee47f74ef0e961a0168e830919606981ef331c52 (patch) | |
tree | 573d8e14e3900a28a20976ad8875fbc8ae34ac5f /gcc/cp | |
parent | 82ba6a8e7e8be8714e0976805cf1423b5c885504 (diff) | |
download | gcc-ee47f74ef0e961a0168e830919606981ef331c52.zip gcc-ee47f74ef0e961a0168e830919606981ef331c52.tar.gz gcc-ee47f74ef0e961a0168e830919606981ef331c52.tar.bz2 |
tree.h (merge_dllimport_decl_attributes, [...]): Remove conditional exposure of prototypes.
* tree.h (merge_dllimport_decl_attributes, handle_dll_attribute):
Remove conditional exposure of prototypes.
(ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Delete.
* tree.c (anon_aggrname_format, anon_aggrname_p): New. Replace macro
definitions in tree.h with functions.
* lto-streamer-out.c (DFS_write_tree_body, hash_tree): Use
anon_aggrname_p.
* tree-streamer-out.c (write_ts_decl_minimal_tree_pointers): Likewise.
* cp/cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
* cp/cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
* cp/decl.c (grokdeclarator, xref_tag_1): Likewise.
* cp/error.c (dump_aggr_type): likewise.
* cp/pt.c (push_template_decl_real): Likewise.
* cp/name-lookup.c (make_anon_name): Use anon_aggrname_format.
From-SVN: r224564
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/cp/cp-lang.c | 2 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 2 | ||||
-rw-r--r-- | gcc/cp/decl.c | 4 | ||||
-rw-r--r-- | gcc/cp/error.c | 2 | ||||
-rw-r--r-- | gcc/cp/name-lookup.c | 2 | ||||
-rw-r--r-- | gcc/cp/pt.c | 2 |
7 files changed, 17 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index cfa392b..98dab4a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,15 @@ 2015-06-17 Andrew MacLeod <amacleod@redhat.com> + * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p. + * cp-tree.h (TYPE_ANONYMOUS_P): Likewise. + * decl.c (grokdeclarator, xref_tag_1): Likewise. + * error.c (dump_aggr_type): likewise. + * pt.c (push_template_decl_real): Likewise. + * name-lookup.c (make_anon_name): Use anon_aggrname_format. + + +2015-06-17 Andrew MacLeod <amacleod@redhat.com> + * call.c: Do not include input.h, line-map.h or is-a.h. * class.c: Likewise. * constexpr.c: Likewise. diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c index 3645a06..0818be4 100644 --- a/gcc/cp/cp-lang.c +++ b/gcc/cp/cp-lang.c @@ -119,7 +119,7 @@ cxx_dwarf_name (tree t, int verbosity) gcc_assert (DECL_P (t)); if (DECL_NAME (t) - && (ANON_AGGRNAME_P (DECL_NAME (t)) || LAMBDA_TYPE_P (t))) + && (anon_aggrname_p (DECL_NAME (t)) || LAMBDA_TYPE_P (t))) return NULL; if (verbosity >= 2) return decl_as_dwarf_string (t, diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 37128be..b53aa90 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -1335,7 +1335,7 @@ enum languages { lang_c, lang_cplusplus, lang_java }; /* Nonzero if NODE has no name for linkage purposes. */ #define TYPE_ANONYMOUS_P(NODE) \ - (OVERLOAD_TYPE_P (NODE) && ANON_AGGRNAME_P (TYPE_LINKAGE_IDENTIFIER (NODE))) + (OVERLOAD_TYPE_P (NODE) && anon_aggrname_p (TYPE_LINKAGE_IDENTIFIER (NODE))) /* The _DECL for this _TYPE. */ #define TYPE_MAIN_DECL(NODE) (TYPE_STUB_DECL (TYPE_MAIN_VARIANT (NODE))) diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 3cb9ca1..c102a4e 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -10389,7 +10389,7 @@ grokdeclarator (const cp_declarator *declarator, /* Replace the anonymous name with the real name everywhere. */ for (t = TYPE_MAIN_VARIANT (type); t; t = TYPE_NEXT_VARIANT (t)) { - if (ANON_AGGRNAME_P (TYPE_IDENTIFIER (t))) + if (anon_aggrname_p (TYPE_IDENTIFIER (t))) /* We do not rename the debug info representing the anonymous tagged type because the standard says in [dcl.typedef] that the naming applies only for @@ -12290,7 +12290,7 @@ xref_tag_1 (enum tag_types tag_code, tree name, /* In case of anonymous name, xref_tag is only called to make type node and push name. Name lookup is not required. */ - if (ANON_AGGRNAME_P (name)) + if (anon_aggrname_p (name)) t = NULL_TREE; else t = lookup_and_check_tag (tag_code, name, diff --git a/gcc/cp/error.c b/gcc/cp/error.c index bb5106c..96fa94d 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -677,7 +677,7 @@ dump_aggr_type (cxx_pretty_printer *pp, tree t, int flags) name = DECL_NAME (name); } - if (name == 0 || ANON_AGGRNAME_P (name)) + if (name == 0 || anon_aggrname_p (name)) { if (flags & TFF_CLASS_KEY_OR_ENUM) pp_string (pp, M_("<anonymous>")); diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index cc11698..1d7afea 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -2096,7 +2096,7 @@ make_anon_name (void) { char buf[32]; - sprintf (buf, ANON_AGGRNAME_FORMAT, anon_cnt++); + sprintf (buf, anon_aggrname_format (), anon_cnt++); return get_identifier (buf); } diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 6a73a2e..60b9498 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -4794,7 +4794,7 @@ push_template_decl_real (tree decl, bool is_friend) if (DECL_CLASS_SCOPE_P (decl)) member_template_p = true; if (TREE_CODE (decl) == TYPE_DECL - && ANON_AGGRNAME_P (DECL_NAME (decl))) + && anon_aggrname_p (DECL_NAME (decl))) { error ("template class without a name"); return error_mark_node; |