summary refs log tree commit diff
path: root/src/test/codegen/export-no-mangle.rs
blob: 78d41e4be0ae9c5848bd1b4c89fb7cfb564666b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// 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;

    // CHECK: void @foo()
    #[no_mangle]
    pub extern fn foo() {}

    // CHECK: void @bar()
    #[export_name = "bar"]
    extern fn bar() {}
}