Commit cf76ef1a by Richard Guenther Committed by Richard Biener

re PR objc++/41430 (exception handling testsuite failures in objc++)

2009-09-22  Richard Guenther  <rguenther@suse.de>

	PR objc++/41430
	* Make-lang.in (objcp-lang.o): Add $(EXCEPT_H) dependency.
	* objcp-lang.c (LANG_HOOKS_EH_PERSONALITY): Define.
	(LANG_HOOKS_EH_RUNTIME_TYPE): Likewise.
	(objcxx_eh_personality): New function.

From-SVN: r151979
parent 65f753a0
2009-09-22 Richard Guenther <rguenther@suse.de>
PR objc++/41430
* Make-lang.in (objcp-lang.o): Add $(EXCEPT_H) dependency.
* objcp-lang.c (LANG_HOOKS_EH_PERSONALITY): Define.
(LANG_HOOKS_EH_RUNTIME_TYPE): Likewise.
(objcxx_eh_personality): New function.
2009-09-03 Diego Novillo <dnovillo@google.com>
* objcp-lang.c (lang_hooks): Remove const qualifier.
......
......@@ -72,7 +72,7 @@ cc1objplus$(exeext): $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBDEPS)
objcp/objcp-lang.o : objcp/objcp-lang.c \
$(CXX_TREE_H) $(TM_H) toplev.h debug.h langhooks.h objc/objc-act.h \
$(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-objcp.h \
$(DIAGNOSTIC_H) cp/cp-objcp-common.h $(GIMPLE_H)
$(DIAGNOSTIC_H) cp/cp-objcp-common.h $(GIMPLE_H) $(EXCEPT_H)
objcp/objcp-decl.o : objcp/objcp-decl.c \
$(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_TREE_H) \
......
......@@ -33,9 +33,11 @@ along with GCC; see the file COPYING3. If not see
#include "diagnostic.h"
#include "debug.h"
#include "cp-objcp-common.h"
#include "except.h"
enum c_language_kind c_language = clk_objcxx;
static void objcxx_init_ts (void);
static tree objcxx_eh_personality (void);
/* Lang hooks common to C++ and ObjC++ are declared in cp/cp-objcp-common.h;
consequently, there should be very few hooks below. */
......@@ -50,6 +52,10 @@ static void objcxx_init_ts (void);
#define LANG_HOOKS_GIMPLIFY_EXPR objc_gimplify_expr
#undef LANG_HOOKS_INIT_TS
#define LANG_HOOKS_INIT_TS objcxx_init_ts
#undef LANG_HOOKS_EH_PERSONALITY
#define LANG_HOOKS_EH_PERSONALITY objcxx_eh_personality
#undef LANG_HOOKS_EH_RUNTIME_TYPE
#define LANG_HOOKS_EH_RUNTIME_TYPE build_eh_type_type
/* Each front end provides its own lang hook initializer. */
struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
......@@ -138,6 +144,20 @@ objcxx_init_ts (void)
init_shadowed_var_for_decl ();
}
static GTY(()) tree objcp_eh_personality_decl;
static tree
objcxx_eh_personality (void)
{
if (!objcp_eh_personality_decl)
objcp_eh_personality_decl
= build_personality_function (USING_SJLJ_EXCEPTIONS
? "__gxx_personality_sj0"
: "__gxx_personality_v0");
return objcp_eh_personality_decl;
}
void
finish_file (void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment