rust/tests/codegen/export-no-mangle.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
557 B
Rust
Raw Normal View History

// compile-flags: -C no-prepopulate-passes
#![crate_type = "lib"]
mod private {
// CHECK: @FOO =
#[no_mangle]
pub static FOO: u32 = 3;
// CHECK: @BAR =
#[export_name = "BAR"]
static BAR: u32 = 3;
2020-06-09 14:49:59 +00:00
// CHECK: void @a()
#[no_mangle]
pub extern "C" fn a() {}
2020-06-09 14:49:59 +00:00
// CHECK: void @b()
#[export_name = "b"]
extern "C" fn b() {}
2020-06-08 08:54:33 +00:00
2020-06-09 14:49:59 +00:00
// CHECK: void @c()
#[export_name = "c"]
2020-06-08 08:37:11 +00:00
#[inline]
extern "C" fn c() {}
2020-06-09 14:54:34 +00:00
2020-06-09 14:49:59 +00:00
// CHECK: void @d()
#[export_name = "d"]
#[inline(always)]
extern "C" fn d() {}
}