make #[unwind] attribute specify expectations more clearly

You can now choose between the following:

- `#[unwind(allowed)]`
- `#[unwind(aborts)]`

Per rust-lang/rust#48251, the default is `#[unwind(allowed)]`, though
I think we should change this eventually.
This commit is contained in:
Niko Matsakis 2018-02-20 13:49:54 -05:00
parent 27a046e933
commit a47fd3df89
13 changed files with 113 additions and 19 deletions

View file

@ -19,7 +19,7 @@ extern {
fn extern_fn();
// CHECK-NOT: Function Attrs: nounwind
// CHECK: declare void @unwinding_extern_fn
#[unwind]
#[unwind(allowed)]
fn unwinding_extern_fn();
}

View file

@ -19,6 +19,7 @@ use std::io::prelude::*;
use std::io;
use std::process::{Command, Stdio};
#[unwind(aborts)]
extern "C" fn panic_in_ffi() {
panic!("Test");
}