#include "config.h"
#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
#include "toplev.h"
#include "tree.h"
#include "c-tree.h"
abort ();
}
+/* By default we always allow bit-field based optimizations. */
+bool
+lhd_can_use_bit_fields_p ()
+{
+ return true;
+}
+
/* Provide a default routine to clear the binding stack. This is used
by languages that don't need to do anything special. */
void
completely handled within this function, it should set *SUBTREES to
0, so that generic handling isn't attempted. For language-specific
tree codes, generic handling would abort(), so make sure it is set
- properly. Both SUBTREES and *SUBTREES is guaranteed to be non-zero
+ properly. Both SUBTREES and *SUBTREES is guaranteed to be nonzero
when the function is called. */
tree
tree
lhd_tree_inlining_copy_res_decl_for_inlining (res, fn, caller,
- dm, ndp, texps)
+ dm, ndp, return_slot_addr)
tree res, fn, caller;
void *dm ATTRIBUTE_UNUSED;
int *ndp ATTRIBUTE_UNUSED;
- void *texps ATTRIBUTE_UNUSED;
+ tree return_slot_addr ATTRIBUTE_UNUSED;
{
- return copy_decl_for_inlining (res, fn, caller);
+ if (return_slot_addr)
+ return build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (return_slot_addr)),
+ return_slot_addr);
+ else
+ return copy_decl_for_inlining (res, fn, caller);
}
/* lang_hooks.tree_inlining.anon_aggr_type_p determines whether T is a
/* lang_hooks.tree_inlining.start_inlining and end_inlining perform any
language-specific bookkeeping necessary for processing
- FN. start_inlining returns non-zero if inlining should proceed, zero if
+ FN. start_inlining returns nonzero if inlining should proceed, zero if
not.
For instance, the C++ version keeps track of template instantiations to
}
/* lang_hooks.tree_dump.dump_tree: Dump language-specific parts of tree
- nodes. Returns non-zero if it does not want the usual dumping of the
+ nodes. Returns nonzero if it does not want the usual dumping of the
second argument. */
int
{
return TYPE_QUALS (t);
}
+
+/* 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 (exp)
+ tree exp;
+{
+ if (TREE_CODE_CLASS (TREE_CODE (exp)) == 'd'
+ && DECL_SIZE_UNIT (exp) != 0)
+ return DECL_SIZE_UNIT (exp);
+ else
+ return size_in_bytes (TREE_TYPE (exp));
+}