codegen: allow the dso_local attribute
The attribute is injected into most items when static relocation is enabled in a target.
This commit is contained in:
parent
5fdeae610d
commit
dc1ed9ddd7
9 changed files with 50 additions and 50 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// CHECK: @VAR1 = constant <{ [4 x i8] }> <{ [4 x i8] c"\01\00\00\00" }>, section ".test_one"
|
||||
// CHECK: @VAR1 = {{(dso_local )?}}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")]
|
||||
|
@ -19,17 +19,17 @@ pub enum E {
|
|||
B(f32)
|
||||
}
|
||||
|
||||
// CHECK: @VAR2 = constant {{.*}}, section ".test_two"
|
||||
// CHECK: @VAR2 = {{(dso_local )?}}constant {{.*}}, section ".test_two"
|
||||
#[no_mangle]
|
||||
#[link_section = ".test_two"]
|
||||
pub static VAR2: E = E::A(666);
|
||||
|
||||
// CHECK: @VAR3 = constant {{.*}}, section ".test_three"
|
||||
// CHECK: @VAR3 = {{(dso_local )?}}constant {{.*}}, section ".test_three"
|
||||
#[no_mangle]
|
||||
#[link_section = ".test_three"]
|
||||
pub static VAR3: E = E::B(1.);
|
||||
|
||||
// CHECK: define void @fn1() {{.*}} section ".test_four" {
|
||||
// CHECK: define {{(dso_local )?}}void @fn1() {{.*}} section ".test_four" {
|
||||
#[no_mangle]
|
||||
#[link_section = ".test_four"]
|
||||
pub fn fn1() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue