Skip to content

Commit

Permalink
Fix LLVM deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Nov 19, 2020
1 parent 18c759f commit 8baa14e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/abi_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Type *get_llvm_vectype(jl_datatype_t *dt) const
assert(nfields > 0);
if (nfields < 2)
return nullptr;
#if JL_LLVM_VERSION >= 120000
#if JL_LLVM_VERSION >= 110000
static Type *T_vec64 = FixedVectorType::get(T_int32, 2);
static Type *T_vec128 = FixedVectorType::get(T_int32, 4);
#else
Expand Down
2 changes: 1 addition & 1 deletion src/abi_ppc64le.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Type *preferred_llvm_type(jl_datatype_t *dt, bool isret) const override
jl_datatype_t *vecty = (jl_datatype_t*)jl_field_type(ty0, 0);
assert(jl_is_datatype(vecty) && vecty->name == jl_vecelement_typename);
Type *ety = bitstype_to_llvm(jl_tparam0(vecty));
#if JL_LLVM_VERSION >= 120000
#if JL_LLVM_VERSION >= 110000
Type *vty = FixedVectorType::get(ety, jl_datatype_nfields(ty0));
#else
Type *vty = VectorType::get(ety, jl_datatype_nfields(ty0));
Expand Down
4 changes: 2 additions & 2 deletions src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ static Type *_julia_struct_to_llvm(jl_codegen_params_t *ctx, jl_value_t *jt, jl_
// We may need to insert padding first to get to the right offset
if (al > MAX_ALIGN) {
Type *AlignmentType;
#if JL_LLVM_VERSION >= 120000
#if JL_LLVM_VERSION >= 110000
AlignmentType = ArrayType::get(FixedVectorType::get(T_int8, al), 0);
#else
AlignmentType = ArrayType::get(VectorType::get(T_int8, al), 0);
Expand Down Expand Up @@ -669,7 +669,7 @@ static Type *_julia_struct_to_llvm(jl_codegen_params_t *ctx, jl_value_t *jt, jl_
}
else if (isarray && !type_is_ghost(lasttype)) {
if (isTuple && isvector && jl_special_vector_alignment(ntypes, jlasttype) != 0)
#if JL_LLVM_VERSION >= 120000
#if JL_LLVM_VERSION >= 110000
struct_decl = FixedVectorType::get(lasttype, ntypes);
#else
struct_decl = VectorType::get(lasttype, ntypes);
Expand Down

0 comments on commit 8baa14e

Please sign in to comment.