Skip to content

Commit

Permalink
build with llvm trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
carnaval authored and vtjnash committed Aug 10, 2015
1 parent 976b62f commit 9f9ecf0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ccall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ Value *llvm_type_rewrite(Value *v, Type *from_type, Type *target_type,
}

// simple integer and float widening & conversion cases
if (from_type->isPrimitiveType() && target_type->getPrimitiveSizeInBits() == from_type->getPrimitiveSizeInBits()) {
if (from_type->getPrimitiveSizeInBits() > 0 && target_type->getPrimitiveSizeInBits() == from_type->getPrimitiveSizeInBits()) {
return builder.CreateBitCast(v, target_type);
}
if (target_type->isFloatingPointTy() && from_type->isFloatingPointTy()) {
Expand Down
2 changes: 1 addition & 1 deletion src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ static jl_cgval_t emit_getfield_knownidx(const jl_cgval_t &strct, unsigned idx,
# ifdef LLVM37
Value *addr = builder.CreateConstInBoundsGEP2_32(
cast<PointerType>(strct.V->getType()->getScalarType())->getElementType(),
strct, 0, idx);
strct.V, 0, idx);
# else
Value *addr = builder.CreateConstInBoundsGEP2_32(strct.V, 0, idx);
# endif
Expand Down
4 changes: 2 additions & 2 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2016,8 +2016,8 @@ static Value *emit_bits_compare(const jl_cgval_t &arg1, const jl_cgval_t &arg2,
for(unsigned i=0; i < l; i++) {
jl_value_t *fldty = jl_svecref(types, i);
Value *subAns, *fld1, *fld2;
fld1 = builder.CreateConstGEP2_32(varg1, 0, i);
fld2 = builder.CreateConstGEP2_32(varg2, 0, i);
fld1 = builder.CreateConstGEP2_32(LLVM37_param(at) varg1, 0, i);
fld2 = builder.CreateConstGEP2_32(LLVM37_param(at) varg2, 0, i);
if (type_is_ghost(fld1->getType()))
continue;
subAns = emit_bits_compare(mark_julia_slot(fld1, fldty), mark_julia_slot(fld2, fldty), ctx);
Expand Down

0 comments on commit 9f9ecf0

Please sign in to comment.