remove internal use of roc_send_signal

This commit is contained in:
Folkert 2022-12-08 12:12:01 +01:00
parent f466ddb0dd
commit c9adafa04b
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -158,7 +158,6 @@ pub fn add_default_roc_externs(env: &Env<'_, '_, '_>) {
unreachable_function(env, "roc_getppid");
unreachable_function(env, "roc_mmap");
unreachable_function(env, "roc_send_signal");
unreachable_function(env, "roc_shm_open");
add_sjlj_roc_panic(env)
@ -168,7 +167,10 @@ pub fn add_default_roc_externs(env: &Env<'_, '_, '_>) {
fn unreachable_function(env: &Env, name: &str) {
// The type of this function (but not the implementation) should have
// already been defined by the builtins, which rely on it.
let fn_val = env.module.get_function(name).unwrap();
let fn_val = match env.module.get_function(name) {
Some(f) => f,
None => panic!("extern function {name} is not defined by the bulitins"),
};
// Add a basic block for the entry point
let entry = env.context.append_basic_block(fn_val, "entry");