File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1929,12 +1929,12 @@ static Function *emit_function(jl_lambda_info_t *lam)
1929
1929
// try to avoid conflicts in the global symbol table
1930
1930
funcName = " julia_" + funcName;
1931
1931
1932
+ jl_value_t *jlrettype = jl_ast_rettype (lam, (jl_value_t *)ast);
1932
1933
if (specsig) {
1933
1934
std::vector<Type*> fsig (0 );
1934
1935
for (size_t i=0 ; i < jl_tuple_len (lam->specTypes ); i++) {
1935
1936
fsig.push_back (julia_type_to_llvm (jl_tupleref (lam->specTypes ,i)));
1936
1937
}
1937
- jl_value_t *jlrettype = jl_ast_rettype (lam, (jl_value_t *)ast);
1938
1938
Type *rt = (jlrettype == (jl_value_t *)jl_nothing->type ? T_void : julia_type_to_llvm (jlrettype));
1939
1939
f = Function::Create (FunctionType::get (rt, fsig, false ),
1940
1940
Function::ExternalLinkage, funcName, jl_Module);
@@ -1950,6 +1950,8 @@ static Function *emit_function(jl_lambda_info_t *lam)
1950
1950
lam->functionObject = (void *)f;
1951
1951
}
1952
1952
}
1953
+ if (jlrettype == (jl_value_t *)jl_bottom_type)
1954
+ f->setDoesNotReturn ();
1953
1955
1954
1956
ctx.f = f;
1955
1957
You can’t perform that action at this time.
0 commit comments