diff options
| author | Pietro Albini <pietro.albini@ferrous-systems.com> | 2023-05-23 15:26:31 +0200 |
|---|---|---|
| committer | Pietro Albini <pietro.albini@ferrous-systems.com> | 2023-05-23 16:54:33 +0200 |
| commit | dc1ed9ddd7d15dfe75453b68bc1da8ae32dbe1f7 (patch) | |
| tree | b0b4f0b57828d3c715d47d28b3529788fa1efb2e /tests/codegen/link_section.rs | |
| parent | 5fdeae610db96d048090b1efaf6b7a2f54aeda12 (diff) | |
codegen: allow the dso_local attribute
The attribute is injected into most items when static relocation is enabled in a target.
Diffstat (limited to 'tests/codegen/link_section.rs')
| -rw-r--r-- | tests/codegen/link_section.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/codegen/link_section.rs b/tests/codegen/link_section.rs index 88b8692b0ac..2b26b604ad3 100644 --- a/tests/codegen/link_section.rs +++ b/tests/codegen/link_section.rs @@ -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() {} |
