@@ -1790,14 +1790,15 @@ static jl_cgval_t convert_julia_type_union(jl_codectx_t &ctx, const jl_cgval_t &
1790
1790
boxv = ctx.builder .CreateSelect (
1791
1791
ctx.builder .CreateAnd (wasboxed, isboxed), v.Vboxed , boxv);
1792
1792
}
1793
+ Value *slotv;
1794
+ MDNode *tbaa;
1793
1795
if (v.V == NULL ) {
1794
1796
// v.V might be NULL if it was all ghost objects before
1795
- return jl_cgval_t (boxv, NULL , false , typ, new_tindex, ctx.tbaa ());
1797
+ slotv = NULL ;
1798
+ tbaa = ctx.tbaa ().tbaa_const ;
1796
1799
}
1797
1800
else {
1798
1801
Value *isboxv = ctx.builder .CreateIsNotNull (boxv);
1799
- Value *slotv;
1800
- MDNode *tbaa;
1801
1802
if (v.ispointer ()) {
1802
1803
slotv = v.V ;
1803
1804
tbaa = v.tbaa ;
@@ -1810,12 +1811,12 @@ static jl_cgval_t convert_julia_type_union(jl_codectx_t &ctx, const jl_cgval_t &
1810
1811
slotv = ctx.builder .CreateSelect (isboxv,
1811
1812
decay_derived (ctx, boxv),
1812
1813
decay_derived (ctx, emit_bitcast (ctx, slotv, boxv->getType ())));
1813
- jl_cgval_t newv = jl_cgval_t (slotv, NULL , false , typ, new_tindex, ctx.tbaa ());
1814
- assert (boxv->getType () == ctx.types ().T_prjlvalue );
1815
- newv.Vboxed = boxv;
1816
- newv.tbaa = tbaa;
1817
- return newv;
1818
1814
}
1815
+ jl_cgval_t newv = jl_cgval_t (slotv, NULL , false , typ, new_tindex, ctx.tbaa ());
1816
+ assert (boxv->getType () == ctx.types ().T_prjlvalue );
1817
+ newv.Vboxed = boxv;
1818
+ newv.tbaa = tbaa;
1819
+ return newv;
1819
1820
}
1820
1821
}
1821
1822
else {
0 commit comments