+/* lang_hooks.expr_size: Determine the size of the value of an expression T
+ in a language-specific way. Returns a tree for the size in bytes. */
+
+tree
+lhd_expr_size (tree exp)
+{
+ if (DECL_P (exp)
+ && DECL_SIZE_UNIT (exp) != 0)
+ return DECL_SIZE_UNIT (exp);
+ else
+ return size_in_bytes (TREE_TYPE (exp));
+}
+
+/* lang_hooks.gimplify_expr re-writes *EXPR_P into GIMPLE form. */
+
+int
+lhd_gimplify_expr (tree *expr_p ATTRIBUTE_UNUSED, tree *pre_p ATTRIBUTE_UNUSED,
+ tree *post_p ATTRIBUTE_UNUSED)
+{
+ return GS_UNHANDLED;
+}
+
+/* lang_hooks.tree_size: Determine the size of a tree with code C,
+ which is a language-specific tree code in category tcc_constant or
+ tcc_exceptional. The default expects never to be called. */
+size_t
+lhd_tree_size (enum tree_code c ATTRIBUTE_UNUSED)
+{
+ gcc_unreachable ();
+}
+
+/* Return true if decl, which is a function decl, may be called by a
+ sibcall. */
+
+bool
+lhd_decl_ok_for_sibcall (tree decl ATTRIBUTE_UNUSED)
+{
+ return true;
+}
+
+/* Return the COMDAT group into which DECL should be placed. */
+
+const char *
+lhd_comdat_group (tree decl)
+{
+ return IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
+}
+
+/* lang_hooks.decls.final_write_globals: perform final processing on
+ global variables. */
+void
+write_global_declarations (void)
+{
+ /* Really define vars that have had only a tentative definition.
+ Really output inline functions that must actually be callable
+ and have not been output so far. */
+
+ tree globals = lang_hooks.decls.getdecls ();
+ int len = list_length (globals);
+ tree *vec = xmalloc (sizeof (tree) * len);
+ int i;
+ tree decl;
+
+ /* Process the decls in reverse order--earliest first.
+ Put them into VEC from back to front, then take out from front. */
+
+ for (i = 0, decl = globals; i < len; i++, decl = TREE_CHAIN (decl))
+ vec[len - i - 1] = decl;
+
+ wrapup_global_declarations (vec, len);
+
+ check_global_declarations (vec, len);
+
+ /* Clean up. */
+ free (vec);
+}
+
+/* Called to perform language-specific initialization of CTX. */
+void
+lhd_initialize_diagnostics (struct diagnostic_context *ctx ATTRIBUTE_UNUSED)
+{
+}
+
+/* The default function to print out name of current function that caused
+ an error. */
+void
+lhd_print_error_function (diagnostic_context *context, const char *file)
+{
+ if (diagnostic_last_function_changed (context))
+ {
+ const char *old_prefix = context->printer->prefix;
+ char *new_prefix = file ? file_name_as_prefix (file) : NULL;
+
+ pp_set_prefix (context->printer, new_prefix);
+
+ if (current_function_decl == NULL)
+ pp_printf (context->printer, _("At top level:"));
+ else
+ {
+ if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE)
+ pp_printf
+ (context->printer, _("In member function %qs:"),
+ lang_hooks.decl_printable_name (current_function_decl, 2));
+ else
+ pp_printf
+ (context->printer, _("In function %qs:"),
+ lang_hooks.decl_printable_name (current_function_decl, 2));
+ }
+
+ diagnostic_set_last_function (context);
+ pp_flush (context->printer);
+ context->printer->prefix = old_prefix;
+ free ((char*) new_prefix);
+ }
+}
+
+tree
+lhd_callgraph_analyze_expr (tree *tp ATTRIBUTE_UNUSED,
+ int *walk_subtrees ATTRIBUTE_UNUSED,
+ tree decl ATTRIBUTE_UNUSED)
+{
+ return NULL;
+}
+
+tree
+lhd_make_node (enum tree_code code)
+{
+ return make_node (code);
+}
+
+HOST_WIDE_INT
+lhd_to_target_charset (HOST_WIDE_INT c)
+{
+ return c;
+}