@@ -1864,14 +1864,15 @@ static jl_cgval_t convert_julia_type_union(jl_codectx_t &ctx, const jl_cgval_t &
1864
1864
boxv = ctx.builder .CreateSelect (
1865
1865
ctx.builder .CreateAnd (wasboxed, isboxed), v.Vboxed , boxv);
1866
1866
}
1867
+ Value *slotv;
1868
+ MDNode *tbaa;
1867
1869
if (v.V == NULL ) {
1868
1870
// v.V might be NULL if it was all ghost objects before
1869
- return jl_cgval_t (boxv, NULL , false , typ, new_tindex, ctx.tbaa ());
1871
+ slotv = NULL ;
1872
+ tbaa = ctx.tbaa ().tbaa_const ;
1870
1873
}
1871
1874
else {
1872
1875
Value *isboxv = ctx.builder .CreateIsNotNull (boxv);
1873
- Value *slotv;
1874
- MDNode *tbaa;
1875
1876
if (v.ispointer ()) {
1876
1877
slotv = v.V ;
1877
1878
tbaa = v.tbaa ;
@@ -1884,12 +1885,12 @@ static jl_cgval_t convert_julia_type_union(jl_codectx_t &ctx, const jl_cgval_t &
1884
1885
slotv = ctx.builder .CreateSelect (isboxv,
1885
1886
decay_derived (ctx, boxv),
1886
1887
decay_derived (ctx, emit_bitcast (ctx, slotv, boxv->getType ())));
1887
- jl_cgval_t newv = jl_cgval_t (slotv, NULL , false , typ, new_tindex, ctx.tbaa ());
1888
- assert (boxv->getType () == ctx.types ().T_prjlvalue );
1889
- newv.Vboxed = boxv;
1890
- newv.tbaa = tbaa;
1891
- return newv;
1892
1888
}
1889
+ jl_cgval_t newv = jl_cgval_t (slotv, NULL , false , typ, new_tindex, ctx.tbaa ());
1890
+ assert (boxv->getType () == ctx.types ().T_prjlvalue );
1891
+ newv.Vboxed = boxv;
1892
+ newv.tbaa = tbaa;
1893
+ return newv;
1893
1894
}
1894
1895
}
1895
1896
else {
0 commit comments