+2010-10-13 Richard Henderson <rth@redhat.com>
+
+ * expr.c (build_personality_function): Take parameter LANG instead
+ of parameter NAME. Build the name based on the lang prefix and the
+ unwind method in use.
+ * tree.c (lhd_gcc_personality): Update call to
+ build_personality_function.
+
2010-10-13 Richard Guenther <rguenther@suse.de>
PR objc/45878
+2010-10-13 Richard Henderson <rth@redhat.com>
+
+ * gcc-interface/misc.c (gnat_eh_personality): Update call to
+ build_personality_function.
+ * raise-gcc.c (PERSONALITY_FUNCTION): Change to match other languages;
+ use__gnat_personality_{v,sj}0.
+
2010-10-12 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Add_Source): Put source in hash table Source_Files_HT
gnat_eh_personality (void)
{
if (!gnat_eh_personality_decl)
- gnat_eh_personality_decl
- = build_personality_function (targetm.except_unwind_info () == UI_SJLJ
- ? "__gnat_eh_personality_sj"
- : "__gnat_eh_personality");
-
+ gnat_eh_personality_decl = build_personality_function ("gnat");
return gnat_eh_personality_decl;
}
===================================
The major point of this unit is to provide an exception propagation
- personality routine for Ada. This is __gnat_eh_personality.
+ personality routine for Ada. This is __gnat_personality_v0.
It is provided with a pointer to the propagated exception, an unwind
context describing a location the propagation is going through, and a
|
| (Ada frame)
|
- +--> __gnat_eh_personality (context, exception)
+ +--> __gnat_personality_v0 (context, exception)
|
+--> get_region_descriptor_for (context)
|
GNU-Ada exceptions are met. */
#ifdef __USING_SJLJ_EXCEPTIONS__
-#define PERSONALITY_FUNCTION __gnat_eh_personality_sj
+#define PERSONALITY_FUNCTION __gnat_personality_sj0
#else
-#define PERSONALITY_FUNCTION __gnat_eh_personality
+#define PERSONALITY_FUNCTION __gnat_personality_v0
#endif
/* Major tweak for ia64-vms : the CHF propagation phase calls this personality
+2010-10-13 Richard Henderson <rth@redhat.com>
+
+ * cp-lang.c (cp_eh_personality): Update call to
+ build_personality_function.
+ * except.c (choose_personality_routine): Update function comment.
+
2010-10-13 Richard Guenther <rguenther@suse.de>
* tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and
{
if (!cp_eh_personality_decl)
{
- const char *name;
-
- name = (targetm.except_unwind_info () == UI_SJLJ
- ? (pragma_java_exceptions
- ? "__gcj_personality_sj0"
- : "__gxx_personality_sj0")
- : (pragma_java_exceptions
- ? "__gcj_personality_v0"
- : "__gxx_personality_v0"));
-
- cp_eh_personality_decl = build_personality_function (name);
+ const char *lang = (pragma_java_exceptions ? "gcj" : "gxx");
+ cp_eh_personality_decl = build_personality_function (lang);
}
return cp_eh_personality_decl;
/* Select the personality routine to be used for exception handling,
or issue an error if we need two different ones in the same
translation unit.
- ??? At present eh_personality_decl is set to
- __gxx_personality_(sj|v)0 in init_exception_processing - should it
- be done here instead? */
+ ??? At present DECL_FUNCTION_PERSONALITY is set via
+ LANG_HOOKS_EH_PERSONALITY. Should it be done here instead? */
void
choose_personality_routine (enum languages lang)
{
return gen_rtx_CONST_VECTOR (mode, v);
}
-
-/* Build a decl for a EH personality function named NAME. */
+/* Build a decl for a personality function given a language prefix. */
tree
-build_personality_function (const char *name)
+build_personality_function (const char *lang)
{
+ const char *unwind_and_version;
tree decl, type;
+ char *name;
+
+ switch (targetm.except_unwind_info ())
+ {
+ case UI_NONE:
+ return NULL;
+ case UI_SJLJ:
+ unwind_and_version = "_sj0";
+ break;
+ case UI_DWARF2:
+ case UI_TARGET:
+ unwind_and_version = "_v0";
+ break;
+ default:
+ gcc_unreachable ();
+ }
+
+ name = ACONCAT (("__", lang, "_personality", unwind_and_version, NULL));
type = build_function_type_list (integer_type_node, integer_type_node,
long_long_unsigned_type_node,
+2010-10-13 Richard Henderson <rth@redhat.com>
+
+ * lang.c (java_eh_personality): Update call to
+ build_personality_function.
+
2010-10-12 Joseph Myers <joseph@codesourcery.com>
* Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
java_eh_personality (void)
{
if (!java_eh_personality_decl)
- java_eh_personality_decl
- = build_personality_function (targetm.except_unwind_info () == UI_SJLJ
- ? "__gcj_personality_sj0"
- : "__gcj_personality_v0");
-
+ java_eh_personality_decl = build_personality_function ("gcj");
return java_eh_personality_decl;
}
+2010-10-13 Richard Henderson <rth@redhat.com>
+
+ * objc-act.c (objc_eh_personality): Update call to
+ build_personality_function.
+
2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
merge from FSF apple 'trunk' branch.
tree
objc_eh_personality (void)
{
- if (!flag_objc_sjlj_exceptions
- && !objc_eh_personality_decl)
- objc_eh_personality_decl
- = build_personality_function (targetm.except_unwind_info () == UI_SJLJ
- ? "__gnu_objc_personality_sj0"
- : "__gnu_objc_personality_v0");
-
+ if (!flag_objc_sjlj_exceptions && !objc_eh_personality_decl)
+ objc_eh_personality_decl = build_personality_function ("gnu_objc");
return objc_eh_personality_decl;
}
#endif
+2010-10-13 Richard Henderson <rth@redhat.com>
+
+ * objcp-lang.c (objcxx_eh_personality): Update call to
+ build_personality_function.
+
2010-10-11 Andi Kleen <ak@linux.intel.com>
* Make-lang.in (cc1objplus-checksum.c): Use correct temporary
objcxx_eh_personality (void)
{
if (!objcp_eh_personality_decl)
- objcp_eh_personality_decl
- = build_personality_function (targetm.except_unwind_info () == UI_SJLJ
- ? "__gxx_personality_sj0"
- : "__gxx_personality_v0");
-
+ objcp_eh_personality_decl = build_personality_function ("gxx");
return objcp_eh_personality_decl;
}
lhd_gcc_personality (void)
{
if (!gcc_eh_personality_decl)
- gcc_eh_personality_decl
- = build_personality_function (targetm.except_unwind_info () == UI_SJLJ
- ? "__gcc_personality_sj0"
- : "__gcc_personality_v0");
-
+ gcc_eh_personality_decl = build_personality_function ("gcc");
return gcc_eh_personality_decl;
}