Ensure that statics are always ByRef
This commit is contained in:
parent
c95e1cccc9
commit
8b99c61701
3 changed files with 69 additions and 133 deletions
|
|
@ -12,11 +12,17 @@
|
|||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// CHECK: @VAR1 = constant i32 1, section ".test_one"
|
||||
// CHECK: @VAR1 = constant <{ [4 x i8] }> <{ [4 x i8] c"\01\00\00\00" }>, section ".test_one"
|
||||
#[no_mangle]
|
||||
#[link_section = ".test_one"]
|
||||
#[cfg(target_endian = "little")]
|
||||
pub static VAR1: u32 = 1;
|
||||
|
||||
#[no_mangle]
|
||||
#[link_section = ".test_one"]
|
||||
#[cfg(target_endian = "big")]
|
||||
pub static VAR1: u32 = 0x01000000;
|
||||
|
||||
pub enum E {
|
||||
A(u32),
|
||||
B(f32)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue