OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/gnu-stable/gcc-4.5.1/gcc/objcp
    from Rev 816 to Rev 826
    Reverse comparison

Rev 816 → Rev 826

/Make-lang.in
0,0 → 1,155
# Top level -*- makefile -*- fragment for GNU Objective-C++
# Copyright (C) 2005, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
# Contributed by Ziemowit Laski <zlaski@apple.com>
 
#This file is part of GCC.
 
#GCC is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 3, or (at your option)
#any later version.
 
#GCC is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
 
#You should have received a copy of the GNU General Public License
#along with GCC; see the file COPYING3. If not see
#<http://www.gnu.org/licenses/>.
 
 
# This file provides the language dependent support in the main Makefile.
# Each language makefile fragment must provide the following targets:
#
# foo.all.cross, foo.start.encap, foo.rest.encap,
# foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
# foo.install-html, foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
# foo.mostlyclean, foo.clean, foo.distclean,
# foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
#
# where `foo' is the name of the language.
#
# It should also provide rules for:
#
# - making any compiler driver (eg: g++)
# - the compiler proper (eg: cc1plus)
# - define the names for selecting the language in LANGUAGES.
 
#
# Define the names for selecting Objective-C++ in LANGUAGES.
obj-c++: cc1objplus$(exeext)
 
# Tell GNU make to ignore these if they exist.
.PHONY: obj-c++
 
# Use maximal warnings for this front end. Also, make ObjC and C++
# headers accessible.
objcp-warn = $(STRICT_WARN) -DOBJCPLUS -I$(srcdir)/objc -I$(srcdir)/cp
 
# Language-specific object files for Objective C++.
OBJCXX_OBJS = objcp/objcp-act.o objcp/objcp-lang.o objcp/objcp-decl.o \
$(CXX_AND_OBJCXX_OBJS)
 
obj-c++_OBJS = $(OBJCXX_OBJS) cc1objplus-checksum.o
 
cc1objplus-dummy$(exeext): $(OBJCXX_OBJS) dummy-checksum.o $(BACKEND) \
$(LIBDEPS)
$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(OBJCXX_OBJS) dummy-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
 
cc1objplus-checksum.c : cc1objplus-dummy$(exeext) build/genchecksum$(build_exeext)
build/genchecksum$(build_exeext) cc1objplus-dummy$(exeext) > $@
 
cc1objplus-checksum.o : cc1objplus-checksum.c $(CONFIG_H) $(SYSTEM_H)
 
cc1objplus$(exeext): $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBDEPS)
$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
 
# Objective C++ language specific files.
 
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) $(EXCEPT_H)
 
objcp/objcp-decl.o : objcp/objcp-decl.c \
$(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_TREE_H) \
toplev.h $(GGC_H) $(C_PRAGMA_H) input.h $(FLAGS_H) output.h \
objc/objc-act.h objcp/objcp-decl.h $(GIMPLE_H) $(EXPR_H) $(TARGET_H)
 
# The following must be an explicit rule; please keep in sync with the implicit
# one in Makefile.in.
objcp/objcp-act.o : objc/objc-act.c \
$(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(TM_P_H) \
$(EXPR_H) $(TARGET_H) $(CXX_TREE_H) $(DIAGNOSTIC_H) toplev.h $(FLAGS_H) \
objc/objc-act.h input.h $(FUNCTION_H) output.h debug.h langhooks.h \
objcp/objcp-decl.h $(LANGHOOKS_DEF_H) $(HASHTAB_H) gt-objc-objc-act.h \
$(GIMPLE_H)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
$(OUTPUT_OPTION)
 
po-generated:
 
#
# Build hooks:
 
obj-c++.all.cross:
obj-c++.start.encap:
obj-c++.rest.encap:
obj-c++.info:
obj-c++.install-info:
obj-c++.dvi:
obj-c++.pdf:
obj-c++.install-pdf:
obj-c++.html:
obj-c++.install-html:
obj-c++.srcinfo:
obj-c++.srcextra:
obj-c++.man:
obj-c++.install-plugin:
 
obj-c++.tags: force
cd $(srcdir)/objcp; etags -o TAGS.sub *.y *.c *.h; \
etags --include TAGS.sub --include ../TAGS.sub
 
lang_checks += check-obj-c++
 
#
# Install hooks:
# cc1objplus is installed elsewhere as part of $(COMPILERS).
 
obj-c++.install-common:
 
obj-c++.install-man:
 
obj-c++.uninstall:
#
# Clean hooks:
# A lot of the ancillary files are deleted by the main makefile.
# We just have to delete files specific to us.
obj-c++.mostlyclean:
-rm -f objcp/*$(objext)
-rm -f objcp/*$(coverageexts)
obj-c++.clean: obj-c++.mostlyclean
obj-c++.distclean:
-rm -f objcp/config.status objcp/Makefile
obj-c++.maintainer-clean:
 
#
# Stage hooks:
 
obj-c++.stage1: stage1-start
-mv objcp/*$(objext) stage1/objcp
obj-c++.stage2: stage2-start
-mv objcp/*$(objext) stage2/objcp
obj-c++.stage3: stage3-start
-mv objcp/*$(objext) stage3/objcp
obj-c++.stage4: stage4-start
-mv objcp/*$(objext) stage4/objcp
obj-c++.stageprofile: stageprofile-start
-mv objcp/*$(objext) stageprofile/objcp
obj-c++.stagefeedback: stagefeedback-start
-mv objcp/*$(objext) stagefeedback/objcp
/lang-specs.h
0,0 → 1,60
/* Definitions for specs for Objective-C++.
Copyright (C) 2005, 2007 Free Software Foundation, Inc.
Contributed by Ziemowit Laski <zlaski@apple.com>
 
This file is part of GCC.
 
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
 
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
 
 
/* This is the contribution to the `default_compilers' array in gcc.c for
obj-c++. It is based on -- and should be kept in sync with -- the g++
spec (found in cp/lang-specs.h). */
 
#ifndef CPLUSPLUS_CPP_SPEC
#define CPLUSPLUS_CPP_SPEC 0
#endif
 
{".mm", "@objective-c++", 0, 0, 0},
{".M", "@objective-c++", 0, 0, 0},
{"@objective-c++-header",
"%{E|M|MM:cc1objplus -E %(cpp_options) %2 %(cpp_debug_options)}\
%{!E:%{!M:%{!MM:\
%{save-temps|no-integrated-cpp:cc1objplus -E\
%(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\
cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\
%{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
%(cc1_options) %2 %{+e1*}\
-o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}",
CPLUSPLUS_CPP_SPEC, 0, 0},
{"@objective-c++",
"%{E|M|MM:cc1objplus -E %(cpp_options) %2 %(cpp_debug_options)}\
%{!E:%{!M:%{!MM:\
%{save-temps|no-integrated-cpp:cc1objplus -E\
%(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\
cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\
%{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
%(cc1_options) %2 %{+e1*}\
%{!fsyntax-only:%(invoke_as)}}}}",
CPLUSPLUS_CPP_SPEC, 0, 0},
{".mii", "@objective-c++-cpp-output", 0, 0, 0},
{"@objective-c++-cpp-output",
"%{!M:%{!MM:%{!E:\
cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
{"@objc++-cpp-output",
"%{!M:%{!MM:%{!E:\
cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
lang-specs.h Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: objcp-decl.c =================================================================== --- objcp-decl.c (nonexistent) +++ objcp-decl.c (revision 826) @@ -0,0 +1,122 @@ +/* Process the ObjC-specific declarations and variables for + the Objective-C++ compiler. + Copyright (C) 2005, 2007 Free Software Foundation, Inc. + Contributed by Ziemowit Laski + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "tm.h" +#include "tree.h" +#include "rtl.h" +#include "expr.h" +#include "cp-tree.h" +#include "c-common.h" +#include "flags.h" +#include "input.h" +#include "except.h" +#include "output.h" +#include "toplev.h" +#include "cpplib.h" +#include "debug.h" +#include "target.h" +#include "varray.h" + +#include "objc-act.h" +#include "objcp-decl.h" + +/* Hacks to simulate start_struct() and finish_struct(). */ + +tree +objcp_start_struct (location_t loc ATTRIBUTE_UNUSED, + enum tree_code code ATTRIBUTE_UNUSED, tree name) +{ + tree s; + /* The idea here is to mimic the actions that the C++ parser takes when + constructing 'extern "C" struct NAME {'. */ + push_lang_context (lang_name_c); + + if (!name) + name = make_anon_name (); + + s = xref_tag (record_type, name, ts_global, 0); + CLASSTYPE_DECLARED_CLASS (s) = 0; /* this is a 'struct', not a 'class'. */ + xref_basetypes (s, NULL_TREE); /* no base classes here! */ + + return begin_class_definition (s, NULL_TREE); +} + +tree +objcp_finish_struct (location_t loc ATTRIBUTE_UNUSED, + tree t, tree fieldlist, tree attributes) +{ + tree field, next_field; + + for (field = fieldlist; field; field = next_field) + { + next_field = TREE_CHAIN (field); /* insert one field at a time; */ + TREE_CHAIN (field) = NULL_TREE; /* otherwise, grokfield croaks. */ + finish_member_declaration (field); + } + t = finish_struct (t, attributes); + pop_lang_context (); + + return t; +} + +void +objcp_finish_function (void) +{ + /* The C++ flavor of 'finish_function' does not generate RTL -- one has + to call 'expand_or_defer_fn' to do that. */ + expand_or_defer_fn (finish_function (0)); +} + +tree +objcp_xref_tag (enum tree_code code ATTRIBUTE_UNUSED, tree name) +{ + return xref_tag (record_type, name, ts_global, false); +} + +int +objcp_comptypes (tree type1, tree type2) +{ + return comptypes (type1, type2, COMPARE_STRICT); +} + +tree +objcp_begin_compound_stmt (int flags ATTRIBUTE_UNUSED) +{ + return begin_compound_stmt (0); +} + +tree +objcp_end_compound_stmt (tree stmt, int flags ATTRIBUTE_UNUSED) +{ + /* The following has been snarfed from + cp/semantics.c:finish_compound_stmt(). */ + if (TREE_CODE (stmt) == BIND_EXPR) + BIND_EXPR_BODY (stmt) = do_poplevel (BIND_EXPR_BODY (stmt)); + else if (STATEMENT_LIST_NO_SCOPE (stmt)) + stmt = pop_stmt_list (stmt); + else + stmt = do_poplevel (stmt); + + return stmt; +}
objcp-decl.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ChangeLog =================================================================== --- ChangeLog (nonexistent) +++ ChangeLog (revision 826) @@ -0,0 +1,260 @@ +2010-07-31 Release Manager + + * GCC 4.5.1 released. + +2010-04-14 Release Manager + + * GCC 4.5.0 released. + +2009-09-22 Richard Guenther + + 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 + + * objcp-lang.c (lang_hooks): Remove const qualifier. + +2009-07-14 Taras Glek + Rafael Espindola + + * Make-lang.in (obj-c.install-plugin): New target for + installing plugin headers. + +2009-06-19 Ian Lance Taylor + + * objcp-decl.h (start_struct): Remove in_struct and struct_types + parameters. Add struct_info parameter. + (finish_struct): Likewise. + +2009-06-13 Aldy Hernandez + + * objcp-decl.h (start_struct): Add location argument. + (finish_struct): Same. + (finish_decl): New. + +2009-06-12 Aldy Hernandez + + * objcp-decl.h (c_end_compound_stmt): New argument. + * objcp-decl.c (objcp_start_struct): Add argument. + (objcp_finish_struct): Same. + +2009-06-03 Ian Lance Taylor + + * Make-lang.in (cc1objplus-checksum.o): Depend upon $(CONFIG_H) + and $(SYSTEM_H). + +2009-05-27 Ian Lance Taylor + + * Make-lang.in (cc1objplus-dummy$(exeext)): Change $(COMPILER) to + $(LINKER). + (cc1objplus$(exeext)): Likewise. + +2009-05-26 Ian Lance Taylor + + * Make-lang.in (cc1objplus-dummy$(exeext)): Use $(COMPILER). + (cc1objplus$(exeext), objcp/objcp-act.o): Likwise. + +2009-05-10 Ian Lance Taylor + + * objcp-decl.h (start_struct): Add three new, ignored, macro + parameters. + (finish_struct): Add two new, ignored, macro parameters. + +2009-04-21 Joseph Myers + + * ChangeLog: Add copyright and license notices. + +2008-12-05 Sebastian Pop + + PR bootstrap/38262 + * Make-lang.in (cc1objplus-dummy, cc1objplus): Add BACKENDLIBS, + remove GMPLIBS. + +2008-09-17 Andrew Pinski + + PR objc/37460 + * objcp-lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define. + +2008-04-03 Tom Tromey + + * Make-lang.in (obj-c++_OBJS): New variable. + +2008-03-27 Tom Tromey + + * Make-lang.in: Revert automatic dependency patch. + +2008-03-25 Tom Tromey + + * Make-lang.in (obj-c++_OBJS): Rename from objcp_OBJS. + (objcp/objcp-act.o): Restore target. + +2008-03-25 Tom Tromey + + * Make-lang.in (objcp_OBJS): New variable. + (cc1objplus-checksum.o, objcp/objcp-lang.o, objcp/objcp-decl.o, + objcp/objcp-act.o): Remove. + +2008-03-07 Paolo Bonzini + + Revert: + + 2008-02-07 Andreas Tobler + Douglas Gregor + + PR bootstrap/35115 + * objcp-decl.c (objcp_comptypes): Call cp_comptypes, not comptypes. + +2008-02-07 Andreas Tobler + Douglas Gregor + + PR bootstrap/35115 + * objcp-decl.c (objcp_comptypes): Call cp_comptypes, not comptypes. + +2008-02-06 Kaveh R. Ghazi + + PR other/35107 + * Make-lang.in (cc1objplus-dummy, cc1objplus): Add $(GMPLIBS). + +2007-08-02 Nick Clifton + + * Make-lang.in: Change copyright header to refer to version 3 of + the GNU General Public License and to point readers at the + COPYING3 file and the FSF's license web page. + * lang-specs.h, objcp-decl.c, objcp-decl.h, config-lang.in, + objcp-lang.c: Likewise. + +2007-03-01 Brooks Moses + + * Make-lang.in: Add dummy lang.install-pdf target. + +2006-10-23 Rafael Ávila de Espíndola + + * objcp-decl.h (objcp_builtin_function): Remove. + +2006-10-10 Brooks Moses + + * Make-lang.in: Added empty "obj-c++.pdf" target. + +2006-08-20 Mark Mitchell + + * objcp-lang.c (objcp_tsubst_copy_and_build): Adjust call to + tsubst_copy_and_build. + +2006-07-28 Volker Reichelt + + * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies. + +2006-07-03 Paolo Bonzini + + PR other/27063 + * config-lang.in: Add subdir_requires. + +2006-06-30 Jason Merrill + + * objcp-decl.c (objcp_start_struct): Pass null attributes argument + to begin_class_definition. + +2006-05-14 H.J. Lu + + * Make-lang.in (objcp/objcp-decl.o): Add dependency on + $(TARGET_H). + +2006-02-20 Rafael Ávila de Espíndola + + * Make-lang.in (OBJ-C++): Remove + (.PHONY): Remove Obj-c++ and obj-C++. Add obj-c++ + +2005-12-14 Andrew Pinski + + * Make-lang.in (objcp/objcp-decl.o): Add depends on $(EXPR_H). + +2005-12-07 Rafael Ávila de Espíndola + + * Make-lang.in (obj-c++.all.build, obj-c++.install-normal): Remove. + +2005-12-07 Rafael Ávila de Espíndola + + * Make-lang.in: Remove all dependencies on s-gtype. + +2005-11-22 Andrew Pinski + + * objcp-decl.c (objcp_lookup_name): Remove. + * objcp-decl.h (objcp_lookup_name): Delete. + (lookup_name): Kill define. + +2005-09-11 Richard Henderson + + * objcp-lang.c (objcxx_init_ts): Remove ALIAS_DECL. + +2005-07-09 Andrew Pinski + + * config-lang.in (gtfiles): Add cp-objcp-common.c. + * objcp-lang.c (objcxx_init_ts): New function. + (LANG_HOOKS_INIT_TS): Define. + +2005-07-03 Kazu Hirata + + * Make-lang.in (cc1plus-checksum.c): Use + build/genchecksum$(build_exeext), not build/genchecksum$(exeext). + +2005-06-30 Zack Weinberg + Jakub Jelinek + + * objcp-lang.c: No need to include cxx-pretty-print.h. + * Make-lang.in: Update dependencies. + +2005-06-25 Kelley Cook + + * all files: Update FSF in copyright headers. + +2005-06-20 Ziemowit Laski + + * config-lang.in (gtfiles): Add cp/rtti.c. + +2005-05-24 Ziemowit Laski + + * objcp-decl.c (objcp_start_struct, objcp_xref_tag): Adjust + call to xref_tag(). + (objcp_build_component_ref): Remove function. + * objcp-decl.h (objcp_build_component_ref): Remove prototype. + (build_component_ref): Remove macro. + * objcp-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Remove. + +2005-05-18 Geoffrey Keating + + * Make-lang.in (cc1objplus-dummy): New. + (cc1objplus-checksum.c): New. + (cc1objplus-checksum.o): New. + (cc1objplus): Add cc1objplus-checksum.o. + +2005-05-17 Ziemowit Laski + Mike Stump + + Yet more Objective-C++... + + * Make-lang.in (objcp/objcp-lang.o): Add tree-gimple.h + (objcp/objcp-decl.o): Likewise. + (objcp/objcp-act.o): Likewise. + * objcp-lang.c (LANG_HOOKS_GIMPLIFY_EXPR): Add. + +2005-04-21 Ziemowit Laski + Mike Stump + + * ChangeLog: New. + * Make-lang.in: Likewise. + * config-lang.in: Likewise. + * lang-specs.h: Likewise. + * objcp-decl.c: Likewise. + * objcp-decl.h: Likewise. + * objcp-lang.c: Likewise. + + +Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved.
ChangeLog Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: objcp-decl.h =================================================================== --- objcp-decl.h (nonexistent) +++ objcp-decl.h (revision 826) @@ -0,0 +1,89 @@ +/* Process the ObjC-specific declarations and variables for + the Objective-C++ compiler. + Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc. + Contributed by Ziemowit Laski + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + + +#ifndef GCC_OBJCP_DECL_H +#define GCC_OBJCP_DECL_H + +extern tree objcp_start_struct (location_t, enum tree_code, tree); +extern tree objcp_finish_struct (location_t, tree, tree, tree); +extern void objcp_finish_function (void); +extern tree objcp_build_function_call (tree, tree); +extern tree objcp_xref_tag (enum tree_code, tree); +extern int objcp_comptypes (tree, tree); +extern tree objcp_begin_compound_stmt (int); +extern tree objcp_end_compound_stmt (tree, int); + +/* Now "cover up" the corresponding C++ functions if required (NB: the + OBJCP_ORIGINAL_FUNCTION macro, shown below, can still be used to + invoke the original C++ functions if needed). */ +#ifdef OBJCP_REMAP_FUNCTIONS + +#define start_struct(loc, code, name, struct_info) \ + objcp_start_struct (loc, code, name) +#define finish_struct(loc, t, fieldlist, attributes, struct_info) \ + objcp_finish_struct (loc, t, fieldlist, attributes) +#define finish_function() \ + objcp_finish_function () +#define finish_decl(decl, loc, init, origtype, asmspec) \ + cp_finish_decl (decl, init, false, asmspec, 0) +#define xref_tag(code, name) \ + objcp_xref_tag (code, name) +#define comptypes(type1, type2) \ + objcp_comptypes (type1, type2) +#define c_begin_compound_stmt(flags) \ + objcp_begin_compound_stmt (flags) +#define c_end_compound_stmt(loc, stmt, flags) \ + objcp_end_compound_stmt (stmt, flags) + +#undef OBJC_TYPE_NAME +#define OBJC_TYPE_NAME(type) \ + (TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL \ + ? DECL_NAME (TYPE_NAME (type)) \ + : TYPE_NAME (type)) +#undef OBJC_SET_TYPE_NAME +#define OBJC_SET_TYPE_NAME(type, name) \ + if(TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL) \ + DECL_NAME (TYPE_NAME (type)) = name; \ + else \ + TYPE_NAME (type) = name; + +#undef TYPE_OBJC_INFO +#define TYPE_OBJC_INFO(TYPE) LANG_TYPE_CLASS_CHECK (TYPE)->objc_info +#undef SIZEOF_OBJC_TYPE_LANG_SPECIFIC +#define SIZEOF_OBJC_TYPE_LANG_SPECIFIC sizeof (struct lang_type_class) +#undef ALLOC_OBJC_TYPE_LANG_SPECIFIC +#define ALLOC_OBJC_TYPE_LANG_SPECIFIC(NODE) \ + do { \ + TYPE_LANG_SPECIFIC (NODE) = GGC_CNEWVAR \ + (struct lang_type, sizeof (struct lang_type_class)); \ + TYPE_LANG_SPECIFIC (NODE)->u.c.h.is_lang_type_class = 1; \ + } while (0) + +#define OBJCP_ORIGINAL_FUNCTION(name, args) (name)args + +/* C++ marks ellipsis-free function parameters differently from C. */ +#undef OBJC_VOID_AT_END +#define OBJC_VOID_AT_END void_list_node + +#endif /* OBJCP_REMAP_FUNCTIONS */ + +#endif /* ! GCC_OBJCP_DECL_H */
objcp-decl.h Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: config-lang.in =================================================================== --- config-lang.in (nonexistent) +++ config-lang.in (revision 826) @@ -0,0 +1,40 @@ +# Top level configure fragment for GNU Objective-C++. +# Copyright (C) 2005, 2007 Free Software Foundation, Inc. +# Contributed by Ziemowit Laski + +#This file is part of GCC. + +#GCC is free software; you can redistribute it and/or modify +#it under the terms of the GNU General Public License as published by +#the Free Software Foundation; either version 3, or (at your option) +#any later version. + +#GCC is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#GNU General Public License for more details. + +#You should have received a copy of the GNU General Public License +#along with GCC; see the file COPYING3. If not see +#. + +# Configure looks for the existence of this file to auto-config each language. +# We define several parameters used by configure: +# +# language - name of language as it would appear in $(LANGUAGES) +# compilers - value to add to $(COMPILERS) + +language="obj-c++" + +compilers="cc1objplus\$(exeext)" + +# Per GCC Steering Committee. +build_by_default="no" + +# By building the Objective-C and C++ front-ends, we will get +# the object files we need, along with the libraries (libstdc++, +# libobjc). +lang_requires="objc c++" +subdir_requires="objc cp" + +gtfiles="\$(srcdir)/objcp/objcp-decl.c \$(srcdir)/objc/objc-act.c \$(srcdir)/objc/objc-act.h \$(srcdir)/cp/rtti.c \$(srcdir)/cp/mangle.c \$(srcdir)/cp/name-lookup.h \$(srcdir)/cp/name-lookup.c \$(srcdir)/cp/cp-tree.h \$(srcdir)/cp/decl.h \$(srcdir)/cp/call.c \$(srcdir)/cp/decl.c \$(srcdir)/cp/decl2.c \$(srcdir)/cp/pt.c \$(srcdir)/cp/repo.c \$(srcdir)/cp/semantics.c \$(srcdir)/cp/tree.c \$(srcdir)/cp/parser.c \$(srcdir)/cp/method.c \$(srcdir)/cp/typeck2.c \$(srcdir)/c-common.c \$(srcdir)/c-common.h \$(srcdir)/c-lex.c \$(srcdir)/c-pragma.h \$(srcdir)/c-pragma.c \$(srcdir)/cp/cp-objcp-common.c" Index: objcp-lang.c =================================================================== --- objcp-lang.c (nonexistent) +++ objcp-lang.c (revision 826) @@ -0,0 +1,168 @@ +/* Language-dependent hooks for Objective-C++. + Copyright 2005, 2007, 2008 Free Software Foundation, Inc. + Contributed by Ziemowit Laski + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + + +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "tm.h" +#include "tree.h" +#include "cp-tree.h" +#include "c-common.h" +#include "toplev.h" +#include "objc-act.h" +#include "langhooks.h" +#include "langhooks-def.h" +#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. */ + +#undef LANG_HOOKS_NAME +#define LANG_HOOKS_NAME "GNU Objective-C++" +#undef LANG_HOOKS_INIT +#define LANG_HOOKS_INIT objc_init +#undef LANG_HOOKS_DECL_PRINTABLE_NAME +#define LANG_HOOKS_DECL_PRINTABLE_NAME objc_printable_name +#undef LANG_HOOKS_GIMPLIFY_EXPR +#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; + +/* Lang hook routines common to C++ and ObjC++ appear in cp/cp-objcp-common.c; + there should be very few (if any) routines below. */ + +tree +objcp_tsubst_copy_and_build (tree t, tree args, tsubst_flags_t complain, + tree in_decl, bool function_p ATTRIBUTE_UNUSED) +{ +#define RECURSE(NODE) \ + tsubst_copy_and_build (NODE, args, complain, in_decl, \ + /*function_p=*/false, \ + /*integral_constant_expression_p=*/false) + + /* The following two can only occur in Objective-C++. */ + + switch ((int) TREE_CODE (t)) + { + case MESSAGE_SEND_EXPR: + return objc_finish_message_expr + (RECURSE (TREE_OPERAND (t, 0)), + TREE_OPERAND (t, 1), /* No need to expand the selector. */ + RECURSE (TREE_OPERAND (t, 2))); + + case CLASS_REFERENCE_EXPR: + return objc_get_class_reference + (RECURSE (TREE_OPERAND (t, 0))); + + default: + break; + } + + /* Fall back to C++ processing. */ + return NULL_TREE; + +#undef RECURSE +} + +static void +objcxx_init_ts (void) +{ + /* objc decls */ + tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_NON_COMMON] = 1; + tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_NON_COMMON] = 1; + tree_contains_struct[KEYWORD_DECL][TS_DECL_NON_COMMON] = 1; + + tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_WITH_VIS] = 1; + tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_WITH_VIS] = 1; + tree_contains_struct[KEYWORD_DECL][TS_DECL_WITH_VIS] = 1; + + tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_WRTL] = 1; + tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_WRTL] = 1; + tree_contains_struct[KEYWORD_DECL][TS_DECL_WRTL] = 1; + + tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_MINIMAL] = 1; + tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_MINIMAL] = 1; + tree_contains_struct[KEYWORD_DECL][TS_DECL_MINIMAL] = 1; + + tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_COMMON] = 1; + tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_COMMON] = 1; + tree_contains_struct[KEYWORD_DECL][TS_DECL_COMMON] = 1; + + /* C++ decls */ + tree_contains_struct[NAMESPACE_DECL][TS_DECL_NON_COMMON] = 1; + tree_contains_struct[USING_DECL][TS_DECL_NON_COMMON] = 1; + tree_contains_struct[TEMPLATE_DECL][TS_DECL_NON_COMMON] = 1; + + tree_contains_struct[NAMESPACE_DECL][TS_DECL_WITH_VIS] = 1; + tree_contains_struct[USING_DECL][TS_DECL_WITH_VIS] = 1; + tree_contains_struct[TEMPLATE_DECL][TS_DECL_WITH_VIS] = 1; + + tree_contains_struct[NAMESPACE_DECL][TS_DECL_WRTL] = 1; + tree_contains_struct[USING_DECL][TS_DECL_WRTL] = 1; + tree_contains_struct[TEMPLATE_DECL][TS_DECL_WRTL] = 1; + + tree_contains_struct[NAMESPACE_DECL][TS_DECL_COMMON] = 1; + tree_contains_struct[USING_DECL][TS_DECL_COMMON] = 1; + tree_contains_struct[TEMPLATE_DECL][TS_DECL_COMMON] = 1; + + tree_contains_struct[NAMESPACE_DECL][TS_DECL_MINIMAL] = 1; + tree_contains_struct[USING_DECL][TS_DECL_MINIMAL] = 1; + tree_contains_struct[TEMPLATE_DECL][TS_DECL_MINIMAL] = 1; + + 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) +{ + objc_finish_file (); +} + +#include "gtype-objcp.h"
objcp-lang.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.