Commit ba429440 by Jan Hubicka Committed by Jan Hubicka

objc-act.c (objc_xref_basetypes): Set TYPE_BINFO of type variants, too.

	* objc-act.c (objc_xref_basetypes): Set TYPE_BINFO of type variants,
	too.

From-SVN: r212112
parent 8910466a
2014-06-24 Jan Hubicka <hubicka@ucw.cz>
* objc-act.c (objc_xref_basetypes): Set TYPE_BINFO of type variants,
too.
2014-06-24 Trevor Saunders <tsaunders@mozilla.com> 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
* objc-act.c: Adjust. * objc-act.c: Adjust.
......
...@@ -2695,12 +2695,16 @@ objc_copy_binfo (tree binfo) ...@@ -2695,12 +2695,16 @@ objc_copy_binfo (tree binfo)
static void static void
objc_xref_basetypes (tree ref, tree basetype) objc_xref_basetypes (tree ref, tree basetype)
{ {
tree variant;
tree binfo = make_tree_binfo (basetype ? 1 : 0); tree binfo = make_tree_binfo (basetype ? 1 : 0);
TYPE_BINFO (ref) = binfo; TYPE_BINFO (ref) = binfo;
BINFO_OFFSET (binfo) = size_zero_node; BINFO_OFFSET (binfo) = size_zero_node;
BINFO_TYPE (binfo) = ref; BINFO_TYPE (binfo) = ref;
gcc_assert (TYPE_MAIN_VARIANT (ref) == ref);
for (variant = ref; variant; variant = TYPE_NEXT_VARIANT (variant))
TYPE_BINFO (variant) = binfo;
if (basetype) if (basetype)
{ {
tree base_binfo = objc_copy_binfo (TYPE_BINFO (basetype)); tree base_binfo = objc_copy_binfo (TYPE_BINFO (basetype));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment