Skip to content

Commit

Permalink
Adjust to LLVM 3.8 API change
Browse files Browse the repository at this point in the history
  • Loading branch information
Keno committed Oct 19, 2015
1 parent 4d7cae8 commit 7d2f7b5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4469,7 +4469,9 @@ static Function *emit_function(jl_lambda_info_t *lam)
continue;
ditypes.push_back(julia_type_to_di(jl_tparam(lam->specTypes,i),ctx.dbuilder,false));
}
#ifdef LLVM36
#ifdef LLVM38
subrty = ctx.dbuilder->createSubroutineType(ctx.dbuilder->getOrCreateTypeArray(ditypes));
#elif defined(LLVM36)
subrty = ctx.dbuilder->createSubroutineType(topfile,ctx.dbuilder->getOrCreateTypeArray(ditypes));
#else
subrty = ctx.dbuilder->createSubroutineType(topfile,ctx.dbuilder->getOrCreateArray(ditypes));
Expand Down Expand Up @@ -5296,7 +5298,10 @@ static void init_julia_llvm_env(Module *m)
// Third argument (length(argv))
diargs.push_back(julia_type_to_di((jl_value_t*)jl_int32_type,&dbuilder,false));

#ifdef LLVM36
#ifdef LLVM38
jl_di_func_sig = dbuilder.createSubroutineType(
dbuilder.getOrCreateTypeArray(diargs));
#elif defined(LLVM36)
jl_di_func_sig = dbuilder.createSubroutineType(julia_h,
dbuilder.getOrCreateTypeArray(diargs));
#else
Expand Down

0 comments on commit 7d2f7b5

Please sign in to comment.