Patchwork [google-4_6] fix undefined typeinfo reference in LIPO (issue6149044)

login
register
mail settings
Submitter Rong Xu
Date May 1, 2012, 10:26 p.m.
Message ID <20120501222638.8B703C0F64@rong.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/156255/
State New
Headers show

Comments

Rong Xu - May 1, 2012, 10:26 p.m.
Hi,

This patch is for google-4_6 branch only.

It fixes a undefined type-info reference in LIPO compilation.

Tested with bootstrap, SPEC and internal benchmarks.

Thanks,

2012-05-01   Rong Xu  <xur@google.com>

	* gcc/cp/rtti.c (get_tinfo_decl): generate tinfo for aux
        modules in LIPO.


--
This patch is available for review at http://codereview.appspot.com/6149044
Xinliang David Li - May 1, 2012, 10:32 p.m.
ok. Needs to be in google47 and google/main too.

David


On Tue, May 1, 2012 at 3:26 PM, Rong Xu <xur@google.com> wrote:
> Hi,
>
> This patch is for google-4_6 branch only.
>
> It fixes a undefined type-info reference in LIPO compilation.
>
> Tested with bootstrap, SPEC and internal benchmarks.
>
> Thanks,
>
> 2012-05-01   Rong Xu  <xur@google.com>
>
>        * gcc/cp/rtti.c (get_tinfo_decl): generate tinfo for aux
>        modules in LIPO.
>
> Index: gcc/cp/rtti.c
> ===================================================================
> --- gcc/cp/rtti.c       (revision 186884)
> +++ gcc/cp/rtti.c       (working copy)
> @@ -443,8 +443,7 @@ get_tinfo_decl (tree type)
>        CLASSTYPE_TYPEINFO_VAR (TYPE_MAIN_VARIANT (type)) = d;
>
>       /* Add decl to the global array of tinfo decls.  */
> -      if (!L_IPO_IS_AUXILIARY_MODULE)
> -        VEC_safe_push (tree, gc, unemitted_tinfo_decls, d);
> +      VEC_safe_push (tree, gc, unemitted_tinfo_decls, d);
>     }
>
>   return d;
>
> --
> This patch is available for review at http://codereview.appspot.com/6149044

Patch

Index: gcc/cp/rtti.c
===================================================================
--- gcc/cp/rtti.c	(revision 186884)
+++ gcc/cp/rtti.c	(working copy)
@@ -443,8 +443,7 @@  get_tinfo_decl (tree type)
 	CLASSTYPE_TYPEINFO_VAR (TYPE_MAIN_VARIANT (type)) = d;
 
       /* Add decl to the global array of tinfo decls.  */
-      if (!L_IPO_IS_AUXILIARY_MODULE)
-        VEC_safe_push (tree, gc, unemitted_tinfo_decls, d);
+      VEC_safe_push (tree, gc, unemitted_tinfo_decls, d);
     }
 
   return d;