]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/objcp/objcp-decl.h
Update copyright years.
[thirdparty/gcc.git] / gcc / objcp / objcp-decl.h
index e335149e0e596801182f1e069ef957ac397c3c35..0c4f67a99430b9a4ba780162815656b743427998 100644 (file)
@@ -1,6 +1,6 @@
 /* Process the ObjC-specific declarations and variables for 
    the Objective-C++ compiler.
-   Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
    Contributed by Ziemowit Laski  <zlaski@apple.com>
 
 This file is part of GCC.
@@ -37,12 +37,14 @@ extern tree objcp_end_compound_stmt (tree, int);
    invoke the original C++ functions if needed).  */
 #ifdef OBJCP_REMAP_FUNCTIONS
 
-#define start_struct(code, name, in_struct, struct_types, loc) \
-       objcp_start_struct (code, name)
-#define finish_struct(t, fieldlist, attributes, in_struct, struct_types) \
-       objcp_finish_struct (t, fieldlist, attributes)
+#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) \
@@ -53,16 +55,9 @@ extern tree objcp_end_compound_stmt (tree, int);
        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))
+#define OBJC_TYPE_NAME(type) (TYPE_IDENTIFIER (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;
+#define OBJC_SET_TYPE_NAME(type, name) (TYPE_IDENTIFIER (type) = (name))
 
 #undef TYPE_OBJC_INFO
 #define TYPE_OBJC_INFO(TYPE) LANG_TYPE_CLASS_CHECK (TYPE)->objc_info
@@ -71,8 +66,8 @@ extern tree objcp_end_compound_stmt (tree, int);
 #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) = (struct lang_type *) \
+      ggc_internal_cleared_alloc (sizeof (struct lang_type_class));    \
     TYPE_LANG_SPECIFIC (NODE)->u.c.h.is_lang_type_class = 1;           \
   } while (0)