2020-04-13 22:21:19 +00:00
|
|
|
// compile-flags: -C no-prepopulate-passes
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
#![feature(ffi_const)]
|
|
|
|
|
|
|
|
pub fn bar() { unsafe { foo() } }
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
extern "C" {
|
2021-03-27 22:11:24 +00:00
|
|
|
// CHECK-LABEL: declare{{.*}}void @foo()
|
2020-04-13 22:21:19 +00:00
|
|
|
// CHECK-SAME: [[ATTRS:#[0-9]+]]
|
2022-11-04 16:20:42 +00:00
|
|
|
// The attribute changed from `readnone` to `memory(none)` with LLVM 16.0.
|
|
|
|
// CHECK-DAG: attributes [[ATTRS]] = { {{.*}}{{readnone|memory\(none\)}}{{.*}} }
|
2020-04-13 22:21:19 +00:00
|
|
|
#[ffi_const] pub fn foo();
|
|
|
|
}
|