Skip to content

Commit

Permalink
Fix build failures and errors in the test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
Keno authored and vtjnash committed Sep 14, 2015
1 parent 2566612 commit 0f8c8f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1585,6 +1585,9 @@ static jl_value_t *static_constant_instance(Constant *constant, jl_value_t *jt)
{
assert(constant != NULL);

if (isa<UndefValue>(constant))
return NULL;

ConstantInt *cint = dyn_cast<ConstantInt>(constant);
if (cint != NULL) {
assert(jl_is_datatype(jt));
Expand Down
12 changes: 6 additions & 6 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2008,13 +2008,13 @@ static Value *emit_bits_compare(const jl_cgval_t &arg1, const jl_cgval_t &arg2,
return builder.CreateICmpEQ(answer, ConstantInt::get(T_int32, 0));
}
else {
at = at->getPointerTo();
Type *atp = at->getPointerTo();
Value *varg1 = arg1.V;
if (varg1->getType() != at)
builder.CreatePointerCast(varg1, at);
if (varg1->getType() != atp)
builder.CreatePointerCast(varg1, atp);
Value *varg2 = arg2.V;
if (varg2->getType() != at)
builder.CreatePointerCast(varg2, at);
if (varg2->getType() != atp)
builder.CreatePointerCast(varg2, atp);
jl_svec_t *types = ((jl_datatype_t*)arg1.typ)->types;
Value *answer = ConstantInt::get(T_int1, 1);
size_t l = jl_svec_len(types);
Expand Down Expand Up @@ -4366,7 +4366,7 @@ static Function *emit_function(jl_lambda_info_t *lam)
topfile, // File
ctx.lineno == -1 ? 0 : ctx.lineno, // Line
// Variable type
julia_type_to_di(varinfo.declType,ctx.dbuilder,specsig));
julia_type_to_di(varinfo.value.typ,ctx.dbuilder,specsig));
#else
varinfo.dinfo = ctx.dbuilder->createLocalVariable(
llvm::dwarf::DW_TAG_arg_variable, // Tag
Expand Down

0 comments on commit 0f8c8f7

Please sign in to comment.