aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-lang.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2010-09-28 13:44:58 -0700
committerRichard Henderson <rth@gcc.gnu.org>2010-09-28 13:44:58 -0700
commitf0a0390e691ece0d859b7d87c6e6617d227cb8dd (patch)
treeabc0f2fe4784df2eb251f4c04a0493fec3eac91d /gcc/cp/cp-lang.c
parentc165dca7efdb3f4bdae82c01b409a6b9cf4dbd65 (diff)
downloadgcc-f0a0390e691ece0d859b7d87c6e6617d227cb8dd.zip
gcc-f0a0390e691ece0d859b7d87c6e6617d227cb8dd.tar.gz
gcc-f0a0390e691ece0d859b7d87c6e6617d227cb8dd.tar.bz2
Hookize TARGET_UNWIND_INFO et al.
From-SVN: r164701
Diffstat (limited to 'gcc/cp/cp-lang.c')
-rw-r--r--gcc/cp/cp-lang.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c
index fb687b8..0b70444 100644
--- a/gcc/cp/cp-lang.c
+++ b/gcc/cp/cp-lang.c
@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see
#include "debug.h"
#include "cp-objcp-common.h"
#include "hashtab.h"
+#include "target.h"
enum c_language_kind c_language = clk_cxx;
static void cp_init_ts (void);
@@ -165,16 +166,17 @@ cp_eh_personality (void)
{
if (!cp_eh_personality_decl)
{
- if (!pragma_java_exceptions)
- cp_eh_personality_decl
- = build_personality_function (USING_SJLJ_EXCEPTIONS
- ? "__gxx_personality_sj0"
- : "__gxx_personality_v0");
- else
- cp_eh_personality_decl
- = build_personality_function (USING_SJLJ_EXCEPTIONS
- ? "__gcj_personality_sj0"
- : "__gcj_personality_v0");
+ 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);
}
return cp_eh_personality_decl;