Skip to content

Commit

Permalink
hide the JIT-function generated names from the global symbol table in…
Browse files Browse the repository at this point in the history
… sys.so
  • Loading branch information
vtjnash committed Jan 30, 2015
1 parent 722b35a commit 5a4e1f8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3571,7 +3571,7 @@ static Function *gen_jlcall_wrapper(jl_lambda_info_t *lam, jl_expr_t *ast, Funct
else
funcName << fname;

Function *w = Function::Create(jl_func_sig, Function::ExternalLinkage,
Function *w = Function::Create(jl_func_sig, imaging_mode ? GlobalVariable::InternalLinkage : GlobalVariable::ExternalLinkage,
funcName.str(), f->getParent());
addComdat(w);
Function::arg_iterator AI = w->arg_begin();
Expand Down Expand Up @@ -3808,7 +3808,8 @@ static Function *emit_function(jl_lambda_info_t *lam, bool cstyle)
}
Type *rt = (jlrettype == (jl_value_t*)jl_void_type ? T_void : julia_type_to_llvm(jlrettype));
f = Function::Create(FunctionType::get(rt, fsig, false),
Function::ExternalLinkage, funcName.str(), m);
imaging_mode ? GlobalVariable::InternalLinkage : GlobalVariable::ExternalLinkage,
funcName.str(), m);
addComdat(f);
if (lam->cFunctionObject == NULL) {
lam->cFunctionObject = (void*)f;
Expand All @@ -3821,7 +3822,7 @@ static Function *emit_function(jl_lambda_info_t *lam, bool cstyle)
}
}
else {
f = Function::Create(jl_func_sig, Function::ExternalLinkage,
f = Function::Create(jl_func_sig, imaging_mode ? GlobalVariable::InternalLinkage : GlobalVariable::ExternalLinkage,
funcName.str(), m);
addComdat(f);
if (lam->functionObject == NULL) {
Expand Down

0 comments on commit 5a4e1f8

Please sign in to comment.