diff options
author | Paul Brook <paul@codesourcery.com> | 2004-08-04 15:33:51 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2004-08-04 15:33:51 +0000 |
commit | 6fc70630f38bb1a131d0cdc278a8a01da486964f (patch) | |
tree | c6669d1a536c5ee91ed55f661a6f7a5a2bd88e47 /gcc/target.h | |
parent | 3ae18a2253aae9503f6443c3d5db1627e6d601b1 (diff) |
gcc/
* target-def.h (TARGET_CXX_CDTOR_RETURNS_THIS): Define.
(TARGET_CXX): Use it.
* target.h (struct gcc_target): Add cdtor_returns_this.
* config/arm/arm.c (arm_cxx_cdtor_returns_this): New function.
(TARGET_CXX_CDTOR_RETURNS_THIS): Define.
* doc/tm.texi: Document TARGET_CXX_CDTOR_RETURNS_THIS.
gcc/cp/
* Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
* cp-tree.h (struct language_function): Rename x_dtor_label to
x_cdtor_label.
(dtor_label): Rename ...
(cdtor_label): ... to this.
* decl.c (begin_constructor_body): Remove.
(check_special_function_return_type): Maybe change the return type.
(grokdeclarator): Pass the class type.
(start_preparsed_function): Constructors may need a return label.
(finish_constructor_body, finish_destructor_body): Set the return
value.
(begin_function_body): Don't call begin_constructor_body.
(finish_function): Don't warn for constructors or destructors.
(implicitly_declare_fn): Maybe change the return type.
* optimize.c: Include target.h.
(maybe_clone_body): Remap the function result.
* semantics.c: Include target.h.
(finish_return_stmt): Maybe jump to return label for constructors.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@85561 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/target.h')
-rw-r--r-- | gcc/target.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/target.h b/gcc/target.h index cdcaa18acd9..44562da3964 100644 --- a/gcc/target.h +++ b/gcc/target.h @@ -492,6 +492,8 @@ struct gcc_target /* Allows backends to perform additional processing when deciding if a class should be exported or imported. */ int (*import_export_class) (tree, int); + /* Returns true if constructors and destructors return "this". */ + bool (*cdtor_returns_this) (void); } cxx; /* Leave the boolean fields at the end. */ |