rust/src/test/codegen/ffi-returns-twice.rs

13 lines
331 B
Rust
Raw Normal View History

2019-02-09 15:55:30 +01:00
// compile-flags: -C no-prepopulate-passes
#![crate_type = "lib"]
#![feature(ffi_returns_twice)]
2019-02-10 09:59:07 +01:00
pub fn bar() { unsafe { foo() } }
2019-02-09 15:55:30 +01:00
2019-02-10 09:59:07 +01:00
extern {
2019-02-10 12:04:23 +01:00
// CHECK-LABEL: declare void @foo()
// CHECK-SAME: [[ATTRS:#[0-9]+]]
// CHECK-DAG: attributes [[ATTRS]] = { {{.*}}returns_twice{{.*}} }
2019-02-10 09:59:07 +01:00
#[ffi_returns_twice] pub fn foo();
2019-02-09 15:55:30 +01:00
}