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 09:49:59 -05:00
// CHECK: void @a()
#[no_mangle]
pub extern "C" fn a() {}
2020-06-09 09:49:59 -05:00
// CHECK: void @b()
#[export_name = "b"]
extern "C" fn b() {}
2020-06-08 03:54:33 -05:00
2020-06-09 09:49:59 -05:00
// CHECK: void @c()
#[export_name = "c"]
2020-06-08 03:37:11 -05:00
#[inline]
extern "C" fn c() {}
2020-06-09 09:54:34 -05:00
2020-06-09 09:49:59 -05:00
// CHECK: void @d()
#[export_name = "d"]
#[inline(always)]
extern "C" fn d() {}
}