Skip to content

Commit 1acecd1

Browse files
committed
[test][IRGen] Fix check on local_extern test.
Windows IR seems to include a `dso_local` annotation, which the check didn't expect and caused a failure in #33813. Added a regex check to ensure the test passes with or without the annotation.
1 parent a7e8dbf commit 1acecd1

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

test/IRGen/local_extern.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
// XFAIL: OS=windows-msvc
12
// RUN: %target-swift-frontend -import-objc-header %S/Inputs/local_extern.h %s -emit-ir | %FileCheck %s
2-
// CHECK: @var = external global i32
3+
// CHECK: @var = external {{(dso_local )?}}global i32
34
// CHECK: @prior_var = internal global i32
45
// CHECK: declare i32 @func
56
// CHECK: define internal i32 @prior_func

test/IRGen/local_extern_windows.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// REQUIRES: OS=windows-msvc
2+
// RUN: %target-swift-frontend -import-objc-header %S/Inputs/local_extern.h %s -emit-ir | %FileCheck %s
3+
// CHECK: @var = external {{(dso_local )?}}global i32
4+
// CHECK: @prior_var = internal global i32
5+
// CHECK: define internal i32 @prior_func
6+
7+
print("\(_no_prior_var())")
8+
print("\(_no_prior_func())")
9+
print("\(_prior_var())")
10+
print("\(_prior_func())")

0 commit comments

Comments
 (0)