Add support for panicking/returning err back to llvm

This commit is contained in:
Lachlan Sneff
2019-04-10 14:17:10 -07:00
parent 6848e81a77
commit 1cb3fbea0a
3 changed files with 19 additions and 9 deletions

View File

@ -32,11 +32,11 @@ fn get_wasm() -> Vec<u8> {
wat2wasm(WAT).unwrap()
}
fn foobar(ctx: &mut Ctx) -> i32 {
fn foobar(_ctx: &mut Ctx) -> i32 {
42
}
fn do_panic(ctx: &mut Ctx) -> Result<i32, String> {
fn do_panic(_ctx: &mut Ctx) -> Result<i32, String> {
Err("error".to_string())
}