* target.h (struct gcc_target): Add new field to struct cxx: import_export_class.
* target-def.h (TARGET_CXX): Initialise the new field.
(TARGET_CXX_IMPORT_EXPORT_CLASS): Provide a default value for the new field.
* doc/tm.texi: Document the new target hook.
* decl2.c (import_export_class): Invoke the import_export_class field in the
gcc_target structure if it is not empty.
From-SVN: r83964
+2004-07-01 Nick Clifton <nickc@redhat.com>
+
+ * target.h (struct gcc_target): Add new field to struct cxx:
+ import_export_class.
+ * target-def.h (TARGET_CXX): Initialise the new field.
+ (TARGET_CXX_IMPORT_EXPORT_CLASS): Provide a default value for
+ the new field.
+ * doc/tm.texi: Document the new target hook.
+
2004-07-01 Paolo Bonzini <bonzini@gnu.org>
* builtins.c (fold_builtin_classify): Fix typo.
+2004-07-01 Nick Clifton <nickc@redhat.com>
+
+ * decl2.c (import_export_class): Invoke the
+ import_export_class field in the gcc_target structure if it is not
+ empty.
+
2004-06-30 Richard Henderson (rth@redhat.com>
* decl.c (start_preparsed_function): Don't set immediate_size_expand.
import_export = 0;
#endif
+ /* Allow backends the chance to overrule the decision. */
+ if (targetm.cxx.import_export_class)
+ import_export = targetm.cxx.import_export_class (ctype, import_export);
+
if (import_export)
{
SET_CLASSTYPE_INTERFACE_KNOWN (ctype);
array cookies. The default is to return @code{false}.
@end deftypefn
+@deftypefn {Target Hook} int TARGET_CXX_IMPORT_EXPORT_CLASS (tree @var{type}, int @var{import_export})
+If defined by a backend this hook allows the decision made to export
+class @var{type} to be overruled. Upon entry @var{import_export}
+will contain 1 if the class is going to be exported, -1 if it is going
+to be imported and 0 otherwise. This function should return the
+modified value and perform any other actions necessary to support the
+backend's targeted operating system.
+@end deftypefn
+
@node Misc
@section Miscellaneous Parameters
@cindex parameters, miscellaneous
#define TARGET_CXX_COOKIE_HAS_SIZE hook_bool_void_false
#endif
+#ifndef TARGET_CXX_IMPORT_EXPORT_CLASS
+#define TARGET_CXX_IMPORT_EXPORT_CLASS NULL
+#endif
+
#define TARGET_CXX \
{ \
TARGET_CXX_GUARD_TYPE, \
TARGET_CXX_GUARD_MASK_BIT, \
TARGET_CXX_GET_COOKIE_SIZE, \
- TARGET_CXX_COOKIE_HAS_SIZE \
+ TARGET_CXX_COOKIE_HAS_SIZE, \
+ TARGET_CXX_IMPORT_EXPORT_CLASS \
}
/* The whole shebang. */
/* Returns true if the element size should be stored in the
array cookie. */
bool (*cookie_has_size) (void);
+ /* Allows backends to perform additional processing when
+ deciding if a class should be exported or imported. */
+ int (*import_export_class) (tree, int);
} cxx;
/* Leave the boolean fields at the end. */