Skip to content

Commit 1633f66

Browse files
committed
Add test for disabled shadow copies in imported functions
1 parent aa1cdfd commit 1633f66

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/Serialization/debug-value.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
// RUN: %{python} %utils/split_file.py -o %t %s
33

44
// RUN: %target-swift-frontend -g -experimental-serialize-debug-info -emit-module -o %t/MyModule.swiftmodule %t/MyModule.swift -O
5-
// RUN: %target-swift-frontend -g -I %t %t/Main.swift -experimental-serialize-debug-info -O -emit-sil -o - | %FileCheck %s
5+
// RUN: %target-swift-frontend -g -I %t %t/Main.swift -experimental-serialize-debug-info -emit-sil -o - | %FileCheck %s
6+
7+
// Shadow copies should not be emitted for imported functions as the imported
8+
// function might be optimized which breaks the unoptimized invariant of
9+
// emitting shadow copies. This invocation crashes if shadow copies are not
10+
// disabled for imported functions
11+
// RUN: %target-swift-frontend -g -I %t %t/Main.swift -experimental-serialize-debug-info -o - -Onone -emit-ir
612

713
// BEGIN MyModule.swift
814
@_alwaysEmitIntoClient @inline(never)

0 commit comments

Comments
 (0)