diff options
author | Nicola Pero <nicola.pero@meta-innovation.com> | 2010-10-24 02:44:03 +0000 |
---|---|---|
committer | Nicola Pero <nicola@gcc.gnu.org> | 2010-10-24 02:44:03 +0000 |
commit | be8cf3b55e32b8bd1eb0672d90f91fc246586178 (patch) | |
tree | 6f572fa5e31169bf082050d6386b94fe8af760ee /gcc/cp | |
parent | b98058c521ec1910609e15ccb064aca07ce16ba0 (diff) | |
download | gcc-be8cf3b55e32b8bd1eb0672d90f91fc246586178.zip gcc-be8cf3b55e32b8bd1eb0672d90f91fc246586178.tar.gz gcc-be8cf3b55e32b8bd1eb0672d90f91fc246586178.tar.bz2 |
In gcc/cp/: 2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/cp/:
2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
Removed Objective-C++ specific replacement of cxx_printable_name.
* cp-objcp-common.h: Added LANG_HOOKS_DECL_PRINTABLE_NAME, set
to cxx_printable_name for both C++ and Objective-C++.
* cp-lang.h: Removed LANG_HOOKS_DECL_PRINTABLE_NAME.
* error.c (dump_decl): For Objective-C++, call
objc_maybe_printable_name here ...
* tree.c (cxx_printable_name_internal): ... instead of here.
In gcc/objcp/:
2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
* objcp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Do not define.
In gcc/objc/:
2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_build_keyword_decl): Updated comments. Do not
emit a warning that method parameter attributes are unimplemented.
Instead, store them into DECL_ATTRIBUTES of the KEYWORD_DECL.
(start_method_def): Copy attributes from each KEYWORD_DECL into
the corresponding PARM_DECL.
(objc_warn_deprecated_use): Removed.
(build_objc_method_call): Call warn_deprecated_use, not
objc_warn_deprecated_use.
(objc_maybe_printable_name): Do not try to get the identifier name
of DECLs that we don't recognize. Immediately return NULL for them.
(objc_printable_name): Removed C++-specific case, which is no
longer used. Updated comments.
In gcc/testsuite/:
2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/attributes/method-attribute-2.m: Updated test. Method
parameter attributes are now supported.
* obj-c++.dg/attributes/method-attribute-2.m: Same change.
* objc.dg/attributes/parameter-attribute-1.m: New test.
* objc.dg/attributes/parameter-attribute-2.m: New test.
* obj-c++.dg/attributes/parameter-attribute-1.m: New test.
* obj-c++.dg/attributes/parameter-attribute-2.m: New test.
From-SVN: r165896
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/cp/cp-lang.c | 2 | ||||
-rw-r--r-- | gcc/cp/cp-objcp-common.h | 2 | ||||
-rw-r--r-- | gcc/cp/error.c | 12 | ||||
-rw-r--r-- | gcc/cp/tree.c | 9 |
5 files changed, 25 insertions, 11 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bf36e6f..6145e01 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,14 @@ +2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com> + + Removed Objective-C++ specific replacement of cxx_printable_name. + * cp-objcp-common.h: Added LANG_HOOKS_DECL_PRINTABLE_NAME, set + to cxx_printable_name for both C++ and Objective-C++. + * cp-lang.h: Removed LANG_HOOKS_DECL_PRINTABLE_NAME. + + * error.c (dump_decl): For Objective-C++, call + objc_maybe_printable_name here ... + * tree.c (cxx_printable_name_internal): ... instead of here. + 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com> * tree.c (cxx_printable_name_internal): In Objective-C++, call diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c index f274d31..9665ba0 100644 --- a/gcc/cp/cp-lang.c +++ b/gcc/cp/cp-lang.c @@ -72,8 +72,6 @@ static tree cp_eh_personality (void); function_parameter_expanded_from_pack_p #undef LANG_HOOKS_GET_GENERIC_FUNCTION_DECL #define LANG_HOOKS_GET_GENERIC_FUNCTION_DECL get_function_template_decl -#undef LANG_HOOKS_DECL_PRINTABLE_NAME -#define LANG_HOOKS_DECL_PRINTABLE_NAME cxx_printable_name #undef LANG_HOOKS_DWARF_NAME #define LANG_HOOKS_DWARF_NAME cxx_dwarf_name #undef LANG_HOOKS_INIT_TS diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h index 6566a28..38da59e 100644 --- a/gcc/cp/cp-objcp-common.h +++ b/gcc/cp/cp-objcp-common.h @@ -69,6 +69,8 @@ extern bool cp_function_decl_explicit_p (tree decl); #define LANG_HOOKS_PRINT_STATISTICS cxx_print_statistics #undef LANG_HOOKS_PRINT_XNODE #define LANG_HOOKS_PRINT_XNODE cxx_print_xnode +#undef LANG_HOOKS_DECL_PRINTABLE_NAME +#define LANG_HOOKS_DECL_PRINTABLE_NAME cxx_printable_name #undef LANG_HOOKS_PRINT_DECL #define LANG_HOOKS_PRINT_DECL cxx_print_decl #undef LANG_HOOKS_PRINT_TYPE diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 3b5cf0a..588cbe8 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -896,6 +896,18 @@ dump_decl (tree t, int flags) if (t == NULL_TREE) return; + /* If doing Objective-C++, give Objective-C a chance to demangle + Objective-C method names. */ + if (c_dialect_objc ()) + { + const char *demangled = objc_maybe_printable_name (t, flags); + if (demangled) + { + pp_string (cxx_pp, demangled); + return; + } + } + switch (TREE_CODE (t)) { case TYPE_DECL: diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 26746f9..b8f76b0 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1409,15 +1409,6 @@ cxx_printable_name_internal (tree decl, int v, bool translate) static int ring_counter; int i; - /* If doing Objective-C++, give Objective-C a chance to demangle - Objective-C method names. */ - if (c_dialect_objc ()) - { - const char *demangled = objc_maybe_printable_name (decl, v); - if (demangled) - return demangled; - } - /* Only cache functions. */ if (v < 2 || TREE_CODE (decl) != FUNCTION_DECL |