Skip to content

Commit

Permalink
fix #34826, unwrap VecElement when needed in julia_const_to_llvm (#…
Browse files Browse the repository at this point in the history
…34829)

(cherry picked from commit a3f7fa8)
  • Loading branch information
JeffBezanson authored and KristofferC committed Feb 21, 2020
1 parent e161506 commit e0d0bb1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/intrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ static Constant *julia_const_to_llvm(const void *ptr, jl_datatype_t *bt)

Type *lt = julia_struct_to_llvm((jl_value_t*)bt, NULL, NULL);

if (jl_is_vecelement_type((jl_value_t*)bt) && !jl_is_uniontype(jl_tparam0(bt)))
bt = (jl_datatype_t*)jl_tparam0(bt);

if (type_is_ghost(lt))
return UndefValue::get(lt);

Expand Down

0 comments on commit e0d0bb1

Please sign in to comment.