Skip to content

Patch to further fix building julia with llvm-svn #22015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 23, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/llvm-lower-handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,22 @@ static void ensure_enter_function(Module &M)
}

bool LowerExcHandlers::doInitialization(Module &M) {
auto T_pint8 = Type::getInt8PtrTy(M.getContext(), 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon and wierd indent...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also go into the if JL_LLVM_VERSION block below.

except_enter_func = M.getFunction("julia.except_enter");
if (!except_enter_func)
return false;
ensure_enter_function(M);
leave_func = M.getFunction("jl_pop_handler");
jlenter_func = M.getFunction("jl_enter_handler");
setjmp_func = M.getFunction(jl_setjmp_name);
lifetime_start = Intrinsic::getDeclaration(&M, Intrinsic::lifetime_start);
lifetime_end = Intrinsic::getDeclaration(&M, Intrinsic::lifetime_end);

#if JL_LLVM_VERSION >= 50000
auto lifetime_start = Intrinsic::getDeclaration(&M, Intrinsic::lifetime_start, { T_pint8 });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop the auto.

auto lifetime_end = Intrinsic::getDeclaration(&M, Intrinsic::lifetime_end, { T_pint8 });
#else
auto lifetime_start = Intrinsic::getDeclaration(&M, Intrinsic::lifetime_start);
auto lifetime_end = Intrinsic::getDeclaration(&M, Intrinsic::lifetime_end);
#endif
return true;
}

Expand Down