Skip to content

Commit 5d5455b

Browse files
authored
Rollup merge of #74171 - ehuss:44056-debug-macos, r=nikomatsakis
Fix 44056 test with debug on macos. The test `codegen/issue-44056-macos-tls-align.rs` fails on macos if `debug-assertions` is enabled in `config.toml`. It has the following error: ``` /Users/eric/Proj/rust/rust/src/test/codegen/issue-44056-macos-tls-align.rs:9:11: error: CHECK: expected string not found in input // CHECK: @STATIC_VAR_1 = thread_local local_unnamed_addr global <{ [32 x i8] }> zeroinitializer, section "__DATA,__thread_bss", align 4 ^ /Users/eric/Proj/rust/rust/build/x86_64-apple-darwin/test/codegen/issue-44056-macos-tls-align/issue-44056-macos-tls-align.ll:1:1: note: scanning from here ; ModuleID = 'issue_44056_macos_tls_align.3a1fbbbh-cgu.0' ^ /Users/eric/Proj/rust/rust/build/x86_64-apple-darwin/test/codegen/issue-44056-macos-tls-align/issue-44056-macos-tls-align.ll:9:1: note: possible intended match here @STATIC_VAR_1 = thread_local global <{ [32 x i8] }> zeroinitializer, section "__DATA,__thread_bss", align 4 ^ ``` Comparing the output, the actual output is missing the text "`local_unnamed_addr`". The fix here is to ignore `local_unnamed_addr`, as it doesn't seem relevant to the test.
2 parents 6ef0dfa + 9f91a95 commit 5d5455b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/codegen/issue-44056-macos-tls-align.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
#![crate_type = "rlib"]
77
#![feature(thread_local)]
88

9-
// CHECK: @STATIC_VAR_1 = thread_local local_unnamed_addr global <{ [32 x i8] }> zeroinitializer, section "__DATA,__thread_bss", align 4
9+
// local_unnamed_addr does not appear when std is built with debug assertions.
10+
// CHECK: @STATIC_VAR_1 = thread_local {{(local_unnamed_addr )?}}global <{ [32 x i8] }> zeroinitializer, section "__DATA,__thread_bss", align 4
1011
#[no_mangle]
1112
#[thread_local]
1213
static mut STATIC_VAR_1: [u32; 8] = [0; 8];
1314

14-
// CHECK: @STATIC_VAR_2 = thread_local local_unnamed_addr global <{ [32 x i8] }> <{{[^>]*}}>, section "__DATA,__thread_data", align 4
15+
// CHECK: @STATIC_VAR_2 = thread_local {{(local_unnamed_addr )?}}global <{ [32 x i8] }> <{{[^>]*}}>, section "__DATA,__thread_data", align 4
1516
#[no_mangle]
1617
#[thread_local]
1718
static mut STATIC_VAR_2: [u32; 8] = [4; 8];

0 commit comments

Comments
 (0)