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